diff options
| author | Enno Boland (tox) <tox@s01.de> | 2010-02-16 19:53:03 +0100 |
|---|---|---|
| committer | Enno Boland (tox) <tox@s01.de> | 2010-02-16 19:53:03 +0100 |
| commit | 13e3aca1cbc322308729d2e6644a420daf811c93 (patch) | |
| tree | d23536538952e5a2369e5f9b0882b6c3494cc1e1 /tabbed.c | |
| parent | c6be3a7d9f36725fa968383e979d1ce00488bd8b (diff) | |
| download | tabbed-13e3aca1cbc322308729d2e6644a420daf811c93.tar.gz | |
improved focus handling
Diffstat (limited to 'tabbed.c')
| -rw-r--r-- | tabbed.c | 11 |
1 files changed, 8 insertions, 3 deletions
@@ -399,7 +399,6 @@ focus(Client *c) { XStoreName(dpy, win, c->name); if(sel != c) { lastsel = sel; - puts("set"); } sel = c; drawbar(); @@ -605,6 +604,8 @@ manage(Window w) { XSync(dpy, False); focus(nextfocus ? c : sel); nextfocus = foreground; + if(!lastsel) + lastsel = c; } } @@ -794,9 +795,13 @@ unmanage(Client *c) { pc->next = c->next; } if(c == lastsel) - lastsel = pc; - focus(lastsel); + lastsel = clients; + if(c == sel) { + sel = pc; + focus(lastsel); + } free(c); + drawbar(); XSync(dpy, False); } |