diff options
author | Kaleb Keithley <kaleb@freedesktop.org> | 2004-02-04 19:42:25 +0000 |
---|---|---|
committer | Kaleb Keithley <kaleb@freedesktop.org> | 2004-02-04 19:42:25 +0000 |
commit | f9a2961a9093f728afae3cec78c0782ae16b6cbc (patch) | |
tree | beec13b43a6701a2f93a2c8dca3b19b60cdc92f4 /src | |
parent | 30c60e30d728e5d19ddbaf29a4b1536deef5d18d (diff) | |
download | xorg-lib-libXinerama-f9a2961a9093f728afae3cec78c0782ae16b6cbc.tar.gz |
{Set,Get}CenterHint are not in the final spec
Diffstat (limited to 'src')
-rw-r--r-- | src/Xinerama.c | 66 |
1 files changed, 1 insertions, 65 deletions
diff --git a/src/Xinerama.c b/src/Xinerama.c index 93ea32c..fde7130 100644 --- a/src/Xinerama.c +++ b/src/Xinerama.c @@ -1,4 +1,4 @@ -/* $XdotOrg: xc/lib/Xinerama/Xinerama.c,v 1.1.4.1 2003/12/18 19:29:12 kaleb Exp $ */ +/* $XdotOrg: xc/lib/Xinerama/Xinerama.c,v 1.1.4.2 2003/12/29 13:38:58 kaleb Exp $ */ /************************************************************************* * * Copyright (c) 1999,2002 Hewlett-Packard Company @@ -239,67 +239,3 @@ XineramaScreenInfo *XineramaQueryScreens(Display *dpy, int *number) } #endif -#define HINT_NAME "XINERAMA_CENTER_HINT" -#define HINT_TYPE "INTEGER" - -Status XineramaGetCenterHint ( - Display *dpy, - Window root, - int *x, - int *y -) -{ - XExtDisplayInfo *info = find_display (dpy); - Atom atom, type, actual_type; - unsigned long nitems, bytes_after; - int actual_format, status; - short *prop; - - XineramaCheckExtension (dpy, info, 0); - - type = XInternAtom(dpy, HINT_TYPE, False); - atom = XInternAtom(dpy, HINT_NAME, True); - - if(atom == None) return 0; /* no such atom */ - - if( (status = XGetWindowProperty(dpy, root, atom, 0, 1, False, type, - &actual_type, &actual_format, &nitems, - &bytes_after, (unsigned char**)(&prop))) - != Success) - return 0; - - if(actual_type == None) return 0; /* no such property */ - - *x = prop[0]; - *y = prop[1]; - - if (prop) XFree(prop); - - return 1; -} - - -Status XineramaSetCenterHint ( - Display *dpy, - Window root, - int x, - int y -) -{ - XExtDisplayInfo *info = find_display (dpy); - Atom atom, type; - short data[2]; - - XineramaCheckExtension (dpy, info, 0); - - atom = XInternAtom(dpy, HINT_NAME, False); - type = XInternAtom(dpy, HINT_TYPE, False); - - data[0] = x; - data[1] = y; - - return XChangeProperty(dpy, root, atom, type, 16, PropModeReplace, - (unsigned char*)data, 2); -} - - |