diff options
| author | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-07-20 18:51:42 +0300 |
|---|---|---|
| committer | Ivan Kanakarakis <ivan.kanak@gmail.com> | 2012-07-22 16:18:53 +0300 |
| commit | 6a19e3f41a1b445b44d0fbd760f0c6c9550c3aee (patch) | |
| tree | cd45bebd2f9c3e902fc7c0f92b0e2b37087963e3 /monsterwm.c | |
| parent | 38f1e4829448fe300e963155e252464ed58ce7ed (diff) | |
update comments for focus function
Diffstat (limited to 'monsterwm.c')
| -rw-r--r-- | monsterwm.c | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/monsterwm.c b/monsterwm.c index e586d6d..6b80ac7 100644 --- a/monsterwm.c +++ b/monsterwm.c @@ -440,19 +440,11 @@ void enternotify(XEvent *e) { } /** - * set current/active/focused and previously focused client - * (iow manage curr and prev references) - * - * restack clients - * - * highlight borders and set active window property and - * give input focus to the current/active/focused client - * - * a window should have borders in any case, except if - * - the window is fullscreen - * - the window is not floating or transient and - * - the mode is MONOCLE or, - * - it is the only window on screen + * 1. set current/active/focused and previously focused client + * in other words, manage curr and prev references + * 2. restack clients + * 3. highlight borders and set active window property + * 4. give input focus to the current/active/focused client */ void focus(Client *c, Desktop *d) { /* update references to prev and curr, @@ -524,6 +516,13 @@ void focus(Client *c, Desktop *d) { w[(d->curr->isfloat || d->curr->istrans) ? 0:ft] = d->curr->win; for (fl += !ISFFT(d->curr) ? 1:0, c = d->head; c; c = c->next) { XSetWindowBorder(dis, c->win, c == d->curr ? win_focus:win_unfocus); + /* + * a window should have borders in any case, except if + * - the window is fullscreen + * - the window is not floating or transient and + * - the mode is MONOCLE or, + * - it is the only window on screen + */ XSetWindowBorderWidth(dis, c->win, c->isfull || (!ISFFT(c) && (d->mode == MONOCLE || !d->head->next)) ? 0:BORDER_WIDTH); if (c != d->curr) w[c->isfull ? --fl:ISFFT(c) ? --ft:--n] = c->win; |
