[hackers] [dwm] made bar based monitor switching working || Anselm R Garbe

From: <hg_AT_suckless.org>
Date: Wed, 24 Jun 2009 18:51:46 +0000 (UTC)

changeset: 1418:37e3b2a40f6f
tag: tip
user: Anselm R Garbe <anselm_AT_garbe.us>
date: Wed Jun 24 19:51:41 2009 +0100
files: dwm.c
description:
made bar based monitor switching working

diff -r 8d447b21ca19 -r 37e3b2a40f6f dwm.c
--- a/dwm.c Wed Jun 24 19:45:47 2009 +0100
+++ b/dwm.c Wed Jun 24 19:51:41 2009 +0100
@@ -400,12 +400,9 @@
         for(m = mons; m; m = m->next)
                 if(ev->window == m->barwin) {
                         if(m != selmon) {
- if(selmon->stack)
- focus(selmon->stack);
- else {
- selmon = m;
- focus(NULL);
- }
+ unfocus(selmon->stack);
+ selmon = m;
+ focus(NULL);
                         }
                         break;
                 }
@@ -1608,6 +1605,7 @@
                 return;
         grabbuttons(c, False);
         XSetWindowBorder(dpy, c->win, dc.norm[ColBorder]);
+ XSetInputFocus(dpy, root, RevertToPointerRoot, CurrentTime);
 }
 
 void
Received on Wed Jun 24 2009 - 18:51:46 UTC

This archive was generated by hypermail 2.2.0 : Wed Jun 24 2009 - 19:00:07 UTC