Re: Why does sawfish draw windows as inactive while other wms draw them as active when a menu pops up?

On Thu, Jan 19, 2006 at 03:59:51AM +0100, Harald van Dijk wrote:
> Just to let anyone interested know: I came across sawfish-mmc [*], and
> while it's not very usable right now (drawing bugs, bad configuration
> menu, and maybe more), it does solve my focus problems, and it also has
> better keyboard handling for the menus. I hope it'll be possible for me
> to split out those modifications from the rest, though it'll be hard
> since there have been a lot of other changes (and since I'm not very
> familiar with sawfish internals yet).
> [*]

Sorry that I haven't posted this earlier, but this patch (from -mmc)
appears to make KDE's menus behave properly:

--- sawfish/src/events.c
+++ sawfish/src/events.c
@@ -955,11 +955,15 @@
     Lisp_Window *w = find_window_by_id (ev->xfocus.window);
     if (ev->xfocus.detail == NotifyPointer)
+    if (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);
Could someone more familiar with sawfish internals say whether this
patch is sane?

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