Mercurial > aewl
changeset 239:e5390f8e06b9
applied sumik's multihead patch
author | Anselm R.Garbe <arg@10ksloc.org> |
---|---|
date | Thu, 10 Aug 2006 11:26:32 +0200 (2006-08-10) |
parents | 969fb6be25e1 |
children | 87c5d5176e17 |
files | client.c draw.c event.c |
diffstat | 3 files changed, 13 insertions(+), 6 deletions(-) [+] |
line wrap: on
line diff
--- a/client.c Thu Aug 10 11:19:25 2006 +0200 +++ b/client.c Thu Aug 10 11:26:32 2006 +0200 @@ -49,6 +49,8 @@ void focus(Client *c) { + if (!issel) + return; Client *old = sel; XEvent ev;
--- a/draw.c Thu Aug 10 11:19:25 2006 +0200 +++ b/draw.c Thu Aug 10 11:26:32 2006 +0200 @@ -138,7 +138,7 @@ int i; Bool istile = arrange == dotile; - if(c == sel) { + if(c == sel && issel) { drawstatus(); XUnmapWindow(dpy, c->title); XSetWindowBorder(dpy, c->win, dc.fg);
--- a/event.c Thu Aug 10 11:19:25 2006 +0200 +++ b/event.c Thu Aug 10 11:26:32 2006 +0200 @@ -114,10 +114,10 @@ } break; case Button4: - viewnext(&a); + viewprev(&a); break; case Button5: - viewprev(&a); + viewnext(&a); break; } } @@ -226,8 +226,11 @@ if((c = getclient(ev->window)) || (c = getctitle(ev->window))) focus(c); - else if(ev->window == root) + else if(ev->window == root) { issel = True; + XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime); + drawall(); + } } static void @@ -267,8 +270,10 @@ { XCrossingEvent *ev = &e->xcrossing; - if((ev->window == root) && !ev->same_screen) - issel = True; + if((ev->window == root) && !ev->same_screen) { + issel = False; + drawall(); + } } static void