~ubuntu-branches/ubuntu/lucid/libx11/lucid

« back to all changes in this revision

Viewing changes to src/GetHints.c

  • Committer: Bazaar Package Importer
  • Author(s): Timo Aaltonen
  • Date: 2009-01-17 16:34:54 UTC
  • mfrom: (1.1.7 upstream)
  • Revision ID: james.westby@ubuntu.com-20090117163454-gaey3cd32xyavueo
Tags: 2:1.1.99.2-1build1
Fakesync with Debian, all previous Ubuntu changes are included
in the new upstream release.

Show diffs side-by-side

added added

removed removed

Lines of Context:
29
29
 
30
30
                        All Rights Reserved
31
31
 
32
 
Permission to use, copy, modify, and distribute this software and its 
33
 
documentation for any purpose and without fee is hereby granted, 
 
32
Permission to use, copy, modify, and distribute this software and its
 
33
documentation for any purpose and without fee is hereby granted,
34
34
provided that the above copyright notice appear in all copies and that
35
 
both that copyright notice and this permission notice appear in 
 
35
both that copyright notice and this permission notice appear in
36
36
supporting documentation, and that the name of Digital not be
37
37
used in advertising or publicity pertaining to distribution of the
38
 
software without specific, written prior permission.  
 
38
software without specific, written prior permission.
39
39
 
40
40
DIGITAL DISCLAIMS ALL WARRANTIES WITH REGARD TO THIS SOFTWARE, INCLUDING
41
41
ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS, IN NO EVENT SHALL
99
99
        return(1);
100
100
}
101
101
 
102
 
/* 
 
102
/*
103
103
 * must return a pointer to the hint, in malloc'd memory, or routine is not
104
104
 * extensible; any use of the caller's memory would cause things to be stepped
105
105
 * on.
115
115
        int actual_format;
116
116
        unsigned long leftover;
117
117
        unsigned long nitems;
118
 
        if (XGetWindowProperty(dpy, w, XA_WM_HINTS, 
 
118
        if (XGetWindowProperty(dpy, w, XA_WM_HINTS,
119
119
            0L, (long)NumPropWMHintsElements,
120
120
            False, XA_WM_HINTS, &actual_type, &actual_format,
121
121
            &nitems, &leftover, (unsigned char **)&prop)
166
166
        return (XGetSizeHints(dpy, w, hints, XA_WM_NORMAL_HINTS));
167
167
}
168
168
 
169
 
                                
 
169
 
170
170
/*
171
 
 * XGetIconSizes reads the property 
 
171
 * XGetIconSizes reads the property
172
172
 *      ICONSIZE_ATOM   type: ICONSIZE_ATOM format: 32
173
173
 */
174
174
 
205
205
        /* static copies not allowed in library, due to reentrancy constraint*/
206
206
 
207
207
        nitems /= NumPropIconSizeElements;
208
 
        if (! (hp = hints = (XIconSize *) 
 
208
        if (! (hp = hints = (XIconSize *)
209
209
          Xcalloc ((unsigned) nitems, (unsigned) sizeof(XIconSize)))) {
210
210
            if (prop) Xfree ((char *) prop);
211
211
            return 0;
280
280
    unsigned long leftover;
281
281
    Window *data = NULL;
282
282
    if (XGetWindowProperty(dpy, w, XA_WM_TRANSIENT_FOR, 0L, 1L, False,
283
 
        XA_WINDOW, 
 
283
        XA_WINDOW,
284
284
        &actual_type,
285
285
        &actual_format, &nitems, &leftover, (unsigned char **) &data)
286
286
        != Success) {
312
312
    unsigned long leftover;
313
313
    unsigned char *data = NULL;
314
314
    if (XGetWindowProperty(dpy, w, XA_WM_CLASS, 0L, (long)BUFSIZ, False,
315
 
        XA_STRING, 
 
315
        XA_STRING,
316
316
        &actual_type,
317
317
        &actual_format, &nitems, &leftover, &data) != Success)
318
318
           return (0);
319
 
        
 
319
 
320
320
   if ( (actual_type == XA_STRING) && (actual_format == 8) ) {
321
321
        len_name = strlen((char *) data);
322
322
        if (! (classhint->res_name = Xmalloc((unsigned) (len_name+1)))) {