[hackers] [dwm] some focus fixes || Anselm R Garbe

From: <hg_AT_suckless.org>
Date: Wed, 24 Jun 2009 17:13:09 +0000 (UTC)

changeset: 1416:e802c6186f6c
tag: tip
user: Anselm R Garbe <garbeam_AT_gmail.com>
date: Wed Jun 24 15:37:32 2009 +0100
files: dwm.c
description:
some focus fixes

diff -r b2265afcdd4e -r e802c6186f6c dwm.c
--- a/dwm.c Wed Jun 24 13:51:45 2009 +0100
+++ b/dwm.c Wed Jun 24 15:37:32 2009 +0100
@@ -762,6 +762,8 @@
                 XSetWindowBorder(dpy, selmon->sel->win, dc.norm[ColBorder]);
         }
         if(c) {
+ if(c->mon != selmon)
+ selmon = c->mon;
                 if(c->isurgent)
                         clearurgent(c);
                 detachstack(c);
@@ -792,8 +794,12 @@
 
         for(i = 0, m = mons; m; m = m->next, i++)
                 if(i == arg->ui) {
- selmon = m;
- focus(NULL);
+ if(m->stack)
+ focus(m->stack);
+ else {
+ selmon = m;
+ focus(NULL);
+ }
                         drawbars();
                         break;
                 }
Received on Wed Jun 24 2009 - 17:13:09 UTC

This archive was generated by hypermail 2.2.0 : Wed Jun 24 2009 - 17:24:04 UTC