diff options
author | Michael Cardell Widerkrantz <mc@hack.org> | 2012-03-06 14:05:32 +0100 |
---|---|---|
committer | Michael Cardell Widerkrantz <mc@hack.org> | 2012-03-06 14:05:32 +0100 |
commit | 350e8df632cf0780766707914f9703465a7c9f5f (patch) | |
tree | ab2dcc875ded3dafbc6520bd7550c46433286e6c /mcwm.c | |
parent | 76ab4565f205b973a7f9f0a9d526e24202d42604 (diff) | |
download | mcwm-350e8df632cf0780766707914f9703465a7c9f5f.zip |
Declare variable iter at top of block.
Added comments.
Diffstat (limited to 'mcwm.c')
-rw-r--r-- | mcwm.c | 12 |
1 files changed, 8 insertions, 4 deletions
@@ -4106,6 +4106,7 @@ int main(int argc, char **argv) char *unfocuscol; char *fixedcol; int scrno; + xcb_screen_iterator_t iter; /* Install signal handlers. */ @@ -4179,7 +4180,11 @@ int main(int argc, char **argv) exit(0); } /* switch */ } - + + /* + * Use $DISPLAY. After connecting scrno will contain the value of + * the display's screen. + */ conn = xcb_connect(NULL, &scrno); if (xcb_connection_has_error(conn)) { @@ -4187,9 +4192,8 @@ int main(int argc, char **argv) exit(1); } - xcb_screen_iterator_t iter - = xcb_setup_roots_iterator(xcb_get_setup(conn)); - + /* Find our screen. */ + iter = xcb_setup_roots_iterator(xcb_get_setup(conn)); for (int i = 0; i < scrno; ++ i) { xcb_screen_next(&iter); |