summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorsabetts <sabetts>2004-10-05 04:23:39 +0000
committersabetts <sabetts>2004-10-05 04:23:39 +0000
commitc3e876b118cb8a0234091180b1d64602da31e563 (patch)
tree731cf8735dbe3ad10be698077d8220910e7c668a /src
parentad1da50e94819e8e79da1fc0246f247bfdbc99a9 (diff)
downloadratpoison-c3e876b118cb8a0234091180b1d64602da31e563.zip
(property_notify): pass the root window to
receive_command. (receive_command): take a root window as an argument and use it to listen for the command.
Diffstat (limited to 'src')
-rw-r--r--src/events.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/events.c b/src/events.c
index 220e7df..8005a26 100644
--- a/src/events.c
+++ b/src/events.c
@@ -483,7 +483,7 @@ execute_remote_command (Window w)
RP_COMMAND Atom. receive_command reads the list of Windows and
executes their associated command. */
static void
-receive_command ()
+receive_command (Window root)
{
char *result;
Atom type_ret;
@@ -505,7 +505,7 @@ receive_command ()
Window w;
length = sizeof (Window) / 4 + (sizeof (Window) % 4 ?1:0);
- ret = XGetWindowProperty (dpy, DefaultRootWindow (dpy),
+ ret = XGetWindowProperty (dpy, root,
rp_command_request,
offset, length,
True, XA_WINDOW, &type_ret, &format_ret,
@@ -565,7 +565,7 @@ property_notify (XEvent *ev)
&& ev->xproperty.state == PropertyNewValue)
{
PRINT_DEBUG (("ratpoison command\n"));
- receive_command();
+ receive_command(ev->xproperty.window);
}
win = find_window (ev->xproperty.window);