summaryrefslogtreecommitdiffstats
path: root/src/blueshift_iccprofile.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@operamail.com>2014-04-12 01:37:18 +0200
committerMattias Andrée <maandree@operamail.com>2014-04-12 01:37:18 +0200
commit1d6282a9226b0ae1ec866dd649764153458ca8d0 (patch)
treedab72590fff17abcf83a01bdc69680a2ac5cf31e /src/blueshift_iccprofile.c
parentuse limits.h (diff)
downloadblueshift-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_iccprofile.c')
-rw-r--r--src/blueshift_iccprofile.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/blueshift_iccprofile.c b/src/blueshift_iccprofile.c
index 99d5c42..e87a5c1 100644
--- a/src/blueshift_iccprofile.c
+++ b/src/blueshift_iccprofile.c
@@ -50,7 +50,6 @@ int main(int argc, char **argv)
char* display = NULL;
xcb_screen_iterator_t iter;
int screen_count;
- xcb_screen_t* screens;
int screen_i;
@@ -83,21 +82,22 @@ int main(int argc, char **argv)
/* Acquire a list of all screens in the display, */
iter = xcb_setup_roots_iterator(xcb_get_setup(connection));
- /* count the list, */
+ /* count the list. */
screen_count = iter.rem;
- /* and start at the first screen. */
- screens = iter.data;
for (screen_i = 0; screen_i < screen_count; screen_i++)
{
/* For each screen */
- xcb_screen_t* screen = screens + screen_i;
+ xcb_screen_t* screen = iter.data;
xcb_list_properties_cookie_t list_cookie;
xcb_list_properties_reply_t* list_reply;
xcb_atom_t* atoms;
xcb_atom_t* atoms_end;
+ /* We have acquired the screen, got to next in preperate for next iteration. */
+ xcb_screen_next(&iter);
+
/* Get root window properties */