From 36ee7bce1b3beec585410aba4d19c2636c5404d5 Mon Sep 17 00:00:00 2001 From: Yann Droneaud Date: Tue, 24 Mar 2009 11:50:20 +0100 Subject: [PATCH 1/3] Don't hard code the screen number --- xcompmgr.c | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/xcompmgr.c b/xcompmgr.c index 5a38cf1..669d5bb 100644 --- a/xcompmgr.c +++ b/xcompmgr.c @@ -1872,16 +1872,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); } -- 1.6.0.2