[sawfish] add support for NotifyWhileGrabbed event explicitly handle NotifyUngrab, making nil the fallback val
- From: Christopher Bratusek <chrisb src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [sawfish] add support for NotifyWhileGrabbed event explicitly handle NotifyUngrab, making nil the fallback val
- Date: Mon, 27 Dec 2010 20:39:01 +0000 (UTC)
commit 6f58671b365c201ef99a3f3ecd06e7a08ffa3e4f
Author: Christopher Roy Bratusek <zanghar freenet de>
Date: Mon Dec 27 21:30:16 2010 +0100
add support for NotifyWhileGrabbed event
explicitly handle NotifyUngrab, making nil the fallback value
lisp/sawfish/wm/state/wm-spec.jl | 4 ++--
src/events.c | 5 ++++-
2 files changed, 6 insertions(+), 3 deletions(-)
---
diff --git a/lisp/sawfish/wm/state/wm-spec.jl b/lisp/sawfish/wm/state/wm-spec.jl
index fa723f9..1837190 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 915b42e..6e3a7b1 100644
--- a/src/events.c
+++ b/src/events.c
@@ -125,6 +125,7 @@ DEFSYM(dimensions, "dimensions");
DEFSYM(normal, "normal");
DEFSYM(grab, "grab");
DEFSYM(ungrab, "ungrab");
+DEFSYM(while_grabbed, "while-grabbed");
repv Fsynthetic_configure_mutex (repv);
@@ -918,7 +919,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]