sawfish r4214 - trunk/src



Author: jkozicki
Date: Sat Jan 19 12:43:06 2008
New Revision: 4214
URL: http://svn.gnome.org/viewvc/sawfish?rev=4214&view=rev

Log:
KDE menus focus by Harald van Dijk

Don't grab focus on KDE menus.

http://sawfish.wikia.com/wiki/KDE_menus_focus



Modified:
   trunk/src/events.c

Modified: trunk/src/events.c
==============================================================================
--- trunk/src/events.c	(original)
+++ trunk/src/events.c	Sat Jan 19 12:43:06 2008
@@ -1045,13 +1045,16 @@
 focus_out (XEvent *ev)
 {
     Lisp_Window *w = find_window_by_id (ev->xfocus.window);
-    if (ev->xfocus.detail == NotifyPointer)
+    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)
 	{
-	    focus_window = 0;
+	    if (ev->xfocus.mode == NotifyNormal || \
+		ev->xfocus.mode == NotifyWhileGrabbed)
+		focus_window = 0;
 	    report_focus_change (w);
 	}
 



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