stumpwm-devel
[Top][All Lists]
Advanced

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

[STUMP] [PATCH] Fix the click-focus show-frame-indicator bug.


From: John Li
Subject: [STUMP] [PATCH] Fix the click-focus show-frame-indicator bug.
Date: Tue, 10 Jun 2008 03:43:58 -0400

With *mouse-focus-policy* set to :click, show-frame-indicator is called
every time the user clicks in a frame, even if it's already focused. The
:button-press event-handler calls switch-to-group, which always calls
show-frame-indicator. This patch changes switch-to-group to only call it
when the group actually changes.
---
 group.lisp |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/group.lisp b/group.lisp
index 39f626e..4afefa2 100644
--- a/group.lisp
+++ b/group.lisp
@@ -91,11 +91,11 @@ at 0. Return a netwm compliant group id."
       ;; restore the focus
       (setf (screen-focus screen) nil)
       (focus-frame new-group (tile-group-current-frame new-group))
+      (show-frame-indicator new-group) ; doesn't get called by focus-frame
       (xlib:change-property (screen-root screen) :_NET_CURRENT_DESKTOP
                             (list (netwm-group-id new-group))
                             :cardinal 32)
-      (run-hook-with-args *focus-group-hook* new-group old-group)))
-  (show-frame-indicator new-group))
+      (run-hook-with-args *focus-group-hook* new-group old-group))))
 
 (defun move-window-to-group (window to-group)
   (labels ((really-move-window (window to-group)
-- 
1.5.5.1





reply via email to

[Prev in Thread] Current Thread [Next in Thread]