diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2011-12-08 02:28:36 +0200 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2011-12-08 20:34:12 +0200 |
| commit | 0087dc78537b3dc846fced53640067b426030646 (patch) | |
| tree | f96ab5ca98c3d13618e8b35620e0dfc23c65b15c /dminiwm.c | |
| parent | 180117bcdfed0915b753079a7a70ff88bbf0dd6a (diff) | |
minor changes and formatting on update_current() function
Diffstat (limited to 'dminiwm.c')
| -rw-r--r-- | dminiwm.c | 23 |
1 files changed, 11 insertions, 12 deletions
@@ -520,26 +520,25 @@ void tile(void) { void update_current(void) { client *c; - for(c=head;c;c=c->next) { - if((head->next == NULL) || (mode == MONOCYCLE)) - XSetWindowBorderWidth(dis,c->win,0); + for(c=head; c; c=c->next) { + if(head->next == NULL || mode == MONOCYCLE) + XSetWindowBorderWidth(dis, c->win, 0); else - XSetWindowBorderWidth(dis,c->win,BORDER_WIDTH); + XSetWindowBorderWidth(dis, c->win, BORDER_WIDTH); - if(current == c) { - // "Enable" current window - XSetWindowBorder(dis,c->win,win_focus); - XSetInputFocus(dis,c->win,RevertToParent,CurrentTime); - XRaiseWindow(dis,c->win); + if(current == c) { /* highlight current window */ + XSetWindowBorder(dis, c->win, win_focus); + XSetInputFocus(dis, c->win, RevertToParent, CurrentTime); + XRaiseWindow(dis, c->win); if(CLICK_TO_FOCUS == 0) XUngrabButton(dis, AnyButton, AnyModifier, c->win); - } - else { - XSetWindowBorder(dis,c->win,win_unfocus); + } else { + XSetWindowBorder(dis, c->win, win_unfocus); if(CLICK_TO_FOCUS == 0) XGrabButton(dis, AnyButton, AnyModifier, c->win, True, ButtonPressMask|ButtonReleaseMask, GrabModeAsync, GrabModeAsync, None, None); } } + free(c); XSync(dis, False); } |
