[PATCH 2/2] Focus-mode `enter-exit' bugfix; it used to react to `pointer-out'. It caused unwanted focus loss.

[ Thread Index | Date Index | More lists.tuxfamily.org/sawfish Archives ]


At least two cases are known. One is when a new instance of gtk's drop down menu appears, and the pointer has been located in the menu's inside area. The other is firefox' urlbar autocompletion; when the cursor lies slightly below the urlbar, and autocompletion appears, it flickers and not few keypresses are lost.

Both were terribly inconvienient.
---
 lisp/sawfish/wm/focus.jl | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/lisp/sawfish/wm/focus.jl b/lisp/sawfish/wm/focus.jl
index 3e1ec93..f480c4d 100644
--- a/lisp/sawfish/wm/focus.jl
+++ b/lisp/sawfish/wm/focus.jl
@@ -155,15 +155,15 @@ EVENT-NAME)', where EVENT-NAME may be one of the following symbols:
 ;;; modes
 
   (define-focus-mode 'enter-exit
-    (lambda (w action . args)
+    ;; `pointer-out' should not be caught. `enter-root' handles it.
+    ;; Furthermore, pointer-out used to make troubles: for example,
+    ;; an appearance of a menu by alt-key which covers the pointer
+    ;; made the focus lost.
+    (lambda (w action)
       (case action
 	((pointer-in)
 	 (when (window-really-wants-input-p w)
 	   (set-input-focus w)))
-	((pointer-out)
-	 ;; ignore grab/ungrab leave events
-	 (when (eq (car args) 'normal)
-	   (set-input-focus nil)))
 	((enter-root)
 	 ;; ensure that any desktop window gets focused
 	 (set-input-focus w))
-- 
2.0.4


----Next_Part(Fri_Mar_13_16_04_14_2015_728)--
Content-Type: Text/X-Patch; charset=us-ascii
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="0001-Bugfix-in-x-cycle.jl.-Previously-the-focus-change-by.patch"



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/