aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYann Droneaud <ydroneaud@mandriva.com>2009-03-24 11:50:20 +0100
committerAdam Jackson <ajax@redhat.com>2009-04-14 10:24:23 -0400
commit56b0b324ae0dbe5dda2bb89ef43427a6c19777bc (patch)
tree79955c95f78b8d0c0c9c51825e7f91faf67a7df1
parentFix error reporting (diff)
downloadxcman-56b0b324ae0dbe5dda2bb89ef43427a6c19777bc.tar.gz
xcman-56b0b324ae0dbe5dda2bb89ef43427a6c19777bc.tar.bz2
xcman-56b0b324ae0dbe5dda2bb89ef43427a6c19777bc.tar.xz
Don't hard code the screen number
-rw-r--r--xcompmgr.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/xcompmgr.c b/xcompmgr.c
index 526c9b8..54aaa41 100644
--- a/xcompmgr.c
+++ b/xcompmgr.c
@@ -1881,16 +1881,17 @@ register_cm (void)
{
Window w;
Atom a;
+ static char net_wm_cm[] = "_NET_WM_CM_Sxx";
- w = XCreateSimpleWindow (dpy, RootWindow (dpy, 0), 0, 0, 1, 1, 0, None,
+ snprintf (net_wm_cm, sizeof (net_wm_cm), "_NET_WM_CM_S%d", scr);
+ a = XInternAtom (dpy, net_wm_cm, False);
+
+ w = XCreateSimpleWindow (dpy, RootWindow (dpy, scr), 0, 0, 1, 1, 0, None,
None);
Xutf8SetWMProperties (dpy, w, "xcompmgr", "xcompmgr", NULL, 0, NULL, NULL,
NULL);
- /* FIXME: Don't hard code the screen number */
- a = XInternAtom (dpy, "_NET_WM_CM_S0", False);
-
XSetSelectionOwner (dpy, a, w, 0);
}