summaryrefslogtreecommitdiff
path: root/src/communications.c
diff options
context:
space:
mode:
authorMathieu OTHACEHE <m.othacehe@gmail.com>2016-11-12 17:58:24 +0100
committerJérémie Courrèges-Anglas <jca@wxcvbn.org>2016-11-17 11:26:11 +0100
commitb0839d05a60e59dfa2722e13586a4857a295d4fd (patch)
treeb73b797e5c2d49daf1dff7b9847826f56984abd7 /src/communications.c
parent710ce5f7d25c96fed0390227d75f28f0c662a1fa (diff)
downloadratpoison-b0839d05a60e59dfa2722e13586a4857a295d4fd.zip
Add xrandr support
Drop deprecated xinerama support and replace it with xrandr. Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com>
Diffstat (limited to 'src/communications.c')
-rw-r--r--src/communications.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/communications.c b/src/communications.c
index 76f3b98..c484a28 100644
--- a/src/communications.c
+++ b/src/communications.c
@@ -105,7 +105,7 @@ receive_command_result (Window w)
}
int
-send_command (unsigned char interactive, unsigned char *cmd, int screen_num)
+send_command (unsigned char interactive, unsigned char *cmd)
{
Window w, root;
int done = 0, return_status = RET_FAILURE;
@@ -114,14 +114,7 @@ send_command (unsigned char interactive, unsigned char *cmd, int screen_num)
s = sbuf_new(0);
sbuf_printf(s, "%c%s", interactive, cmd);
-
- /* If the user specified a specific screen, then send the event to
- that screen. */
- if (screen_num >= 0)
- root = RootWindow (dpy, screen_num);
- else
- root = DefaultRootWindow (dpy);
-
+ root = RootWindow (dpy, DefaultScreen (dpy));
w = XCreateSimpleWindow (dpy, root, 0, 0, 1, 1, 0, 0, 0);
/* Select first to avoid race condition */