Re: Broken enter-exit focus behavior in 1.5.3

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
         (when (window-really-wants-input-p w)
           (set-input-focus w)))
         ;; ignore grab/ungrab leave events
         (when (eq (car args) 'normal)
           (set-input-focus nil)))
         ;; ensure that any desktop window gets focused
         (set-input-focus w))
         (unless (eq (query-pointer-window) w)
           (warp-cursor-to-window w)))
         (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
          (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 Upham
sand blarg net

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