[hackers] [dwm] applied Peters wintoclient/wintomon optimisation in enternotify() || garbeam

From: <hg_AT_suckless.org>
Date: Sun, 10 Jul 2011 20:24:13 +0200 (CEST)

changeset: 1562:761648f3d9fa
user: garbeam_AT_gmail.com
date: Sun Jul 10 21:22:22 2011 +0100
files: dwm.c
description:
applied Peters wintoclient/wintomon optimisation in enternotify()

diff -r 5b4d7f3b03f9 -r 761648f3d9fa dwm.c
--- a/dwm.c Sun Jul 10 21:18:50 2011 +0100
+++ b/dwm.c Sun Jul 10 21:22:22 2011 +0100
@@ -827,13 +827,14 @@
         if((ev->mode != NotifyNormal || ev->detail == NotifyInferior) && ev->window != root)
                 return;
         c = wintoclient(ev->window);
- if((m = wintomon(ev->window)) && m != selmon) {
+ m = c ? c->mon : wintomon(ev->window);
+ if(m != selmon) {
                 unfocus(selmon->sel, True);
                 selmon = m;
         }
- else if(c == selmon->sel || c == NULL)
+ else if(!c || c == selmon->sel)
                 return;
- focus((wintoclient(ev->window)));
+ focus(c);
 }
 
 void
Received on Sun Jul 10 2011 - 20:24:13 CEST

This archive was generated by hypermail 2.2.0 : Sun Jul 10 2011 - 20:36:07 CEST