diff options
author | Mattias Andrée <maandree@operamail.com> | 2014-04-12 01:37:18 +0200 |
---|---|---|
committer | Mattias Andrée <maandree@operamail.com> | 2014-04-12 01:37:18 +0200 |
commit | 1d6282a9226b0ae1ec866dd649764153458ca8d0 (patch) | |
tree | dab72590fff17abcf83a01bdc69680a2ac5cf31e /src/blueshift_randr_c.c | |
parent | use limits.h (diff) | |
download | blueshift-1d6282a9226b0ae1ec866dd649764153458ca8d0.tar.gz blueshift-1d6282a9226b0ae1ec866dd649764153458ca8d0.tar.bz2 blueshift-1d6282a9226b0ae1ec866dd649764153458ca8d0.tar.xz |
m + fix multiscreen bug
Signed-off-by: Mattias Andrée <maandree@operamail.com>
Diffstat (limited to 'src/blueshift_randr_c.c')
-rw-r--r-- | src/blueshift_randr_c.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/blueshift_randr_c.c b/src/blueshift_randr_c.c index 0e38afc..eb3bdf1 100644 --- a/src/blueshift_randr_c.c +++ b/src/blueshift_randr_c.c @@ -65,6 +65,7 @@ int blueshift_randr_open(int use_screen, char* display) xcb_randr_get_crtc_gamma_size_reply_t* gamma_size_reply; xcb_randr_get_crtc_gamma_cookie_t gamma_get_cookie; xcb_randr_get_crtc_gamma_reply_t* gamma_get_reply; + int iter_i; @@ -101,7 +102,9 @@ int blueshift_randr_open(int use_screen, char* display) /* Get X resources */ iter = xcb_setup_roots_iterator(xcb_get_setup(connection)); - screen = iter.data + use_screen; + for (iter_i = 0; iter_i < use_screen; iter_i++) + xcb_screen_next(&iter); + screen = iter.data; res_cookie = xcb_randr_get_screen_resources_current(connection, screen->root); res_reply = xcb_randr_get_screen_resources_current_reply(connection, res_cookie, &error); |