Re: Problem with sawfish and GNOME global menus



On Sat, 2010-12-25 at 12:42 +0200, Timo Korvola wrote:
> On Friday 24 December 2010 01:08:57 Harald van Dijk wrote:
> > Ah yes, you're right. Sometimes the little things are too easy to
> > overlook. Thanks, here's an updated patch that takes the approach of
> > the previous one, and also updates mode_to_sym.
> 
> Looks good, although
> DEFSYM(while_grabbed, "while-grabbed");
> would be more consistent style.

You're right. A patch with that one change is attached.

Merry Christmas,
Harald
diff --git a/lisp/sawfish/wm/state/wm-spec.jl b/lisp/sawfish/wm/state/wm-spec.jl
index 674cd9e..7402969 100644
--- a/lisp/sawfish/wm/state/wm-spec.jl
+++ b/lisp/sawfish/wm/state/wm-spec.jl
@@ -264,9 +264,9 @@
 
   (define last-focus nil)
 
-  (define (update-focus-state)
+  (define (update-focus-state w mode)
     (let ((focus (input-focus)))
-      (unless (eq last-focus focus)
+      (unless (or (eq mode 'grab) (eq mode 'ungrab) (eq last-focus focus))
 	(setq last-focus focus)
 	(set-x-property 'root '_NET_ACTIVE_WINDOW
 			(vector (if focus (window-id focus) 0)) 'WINDOW 32))))
diff --git a/src/events.c b/src/events.c
index 9b6a1db..8a7917d 100644
--- a/src/events.c
+++ b/src/events.c
@@ -124,6 +124,7 @@ DEFSYM(dimensions, "dimensions");
 DEFSYM(normal, "normal");
 DEFSYM(grab, "grab");
 DEFSYM(ungrab, "ungrab");
+DEFSYM(while_grabbed, "while-grabbed");
 
 repv Fsynthetic_configure_mutex (repv);
 
@@ -917,7 +918,9 @@ mode_to_sym (int mode)
 {
     return (mode == NotifyNormal ? Qnormal
 	    : mode == NotifyGrab ? Qgrab
-	    : Qungrab);
+	    : mode == NotifyUngrab ? Qungrab
+	    : mode == NotifyWhileGrabbed ? Qwhile_grabbed
+	    : Qnil);
 }
 
 static void


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