[sawfish: 1/6] Streamlined the KDE menus focus patch a bit.



commit 400b488b7468c5caa784c54cacaf4177db893431
Author: Timo Korvola <tkorvola iki fi>
Date:   Mon May 4 23:04:04 2009 +0300

    Streamlined the KDE menus focus patch a bit.
    
    (See c19ff9b4aa1dacf306d2c0485ee47dc54f203a36.)

 src/events.c |    8 +++-----
 1 files changed, 3 insertions(+), 5 deletions(-)
---
diff --git a/src/events.c b/src/events.c
index f18d3f8..6daefd7 100644
--- a/src/events.c
+++ b/src/events.c
@@ -1049,16 +1049,14 @@ static void
 focus_out (XEvent *ev)
 {
     Lisp_Window *w = find_window_by_id (ev->xfocus.window);
-    if (ev->xfocus.detail == NotifyPointer ||
-	ev->xfocus.mode == NotifyGrab || ev->xfocus.mode == NotifyUngrab)
+    if (ev->xfocus.detail == NotifyPointer
+        || ev->xfocus.mode == NotifyGrab || ev->xfocus.mode == NotifyUngrab)
 	return;
     if (w != 0 && ev->xfocus.detail != NotifyInferior)
     {
 	if (focus_window == w)
 	{
-	    if (ev->xfocus.mode == NotifyNormal || \
-		ev->xfocus.mode == NotifyWhileGrabbed)
-		focus_window = 0;
+            focus_window = 0;
 	    report_focus_change (w);
 	}
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]