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

« back to all changes in this revision

Viewing changes to src/StBytes.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:
53
53
     */
54
54
    return XRotateWindowProperties(dpy, RootWindow(dpy, 0), n_to_atom, 8, rotate);
55
55
}
56
 
    
 
56
 
57
57
char *XFetchBuffer (
58
58
    register Display *dpy,
59
59
    int *nbytes,
67
67
    *nbytes = 0;
68
68
    if ((buffer < 0) || (buffer > 7)) return (NULL);
69
69
/* XXX should be (sizeof (maxint) - 1)/4 */
70
 
    if (XGetWindowProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer], 
71
 
        0L, 10000000L, False, XA_STRING, 
 
70
    if (XGetWindowProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer],
 
71
        0L, 10000000L, False, XA_STRING,
72
72
        &actual_type, &actual_format, &nitems, &leftover, &data) != Success) {
73
73
        return (NULL);
74
74
        }
95
95
    register int buffer)
96
96
{
97
97
    if ((buffer < 0) || (buffer > 7)) return 0;
98
 
    return XChangeProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer], 
 
98
    return XChangeProperty(dpy, RootWindow(dpy, 0), n_to_atom[buffer],
99
99
        XA_STRING, 8, PropModeReplace, (unsigned char *) bytes, nbytes);
100
100
}
101
101