Re: Broken enter-exit focus behavior in 1.5.3
- From: sand blarg net
- To: General discussion about sawfish wm <sawfish-list gnome org>
- Subject: Re: Broken enter-exit focus behavior in 1.5.3
- Date: Wed, 2 Dec 2009 18:55:59 -0800
Timo Korvola writes:
> It is better to leave this as it was, continuing to ignore grab-induced
> LeaveNotify events. Otherwise you will get funny effects from Qt menus
> at least.
Revised version:
(define fixed-enter-exit
(lambda (w action . args)
(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))
((warp-if-necessary)
(unless (eq (query-pointer-window) w)
(warp-cursor-to-window w)))
((focus-revert)
(setq w (query-pointer-window))
(when (or (null w)
(window-really-wants-input-p w))
(set-input-focus w)))
((focus-in focus-out leave-root)
;; ignore all of these
nil)
(t
(display-message
(format nil "Dropped focus action %s %s" action args))))))
(put 'enter-exit 'focus-mode fixed-enter-exit)
This attempts to warn about any new action, so the user can re-sync
with the original.
Derek
--
Derek Upham
sand blarg net
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]