Re: focusing unfocused windows with a click when focus mode is enter-only

On Thu, Mar 6, 2008 at 9:36 PM, Janek Kozicki <janek_listy wp pl> wrote:
> GSR - FR said:     (by the date of Thu, 6 Mar 2008 21:18:19 +0100)
>  > > With the focus mode set to focus follows mouse (enter-only or similar),
>  > > if you put your mouse over WindowA then alt+tab away to WindowB, can
>  > > WindowA be refocused with a mouse click?
>  >
>  > A bit old, but maybe worth updating, or at least reading:
>  >

Nice catch. ^__^

>  this looks interesting. If anyone would submit a patch to wiki
>  which adds this functionality, it would be great.

What if we add it as a script?

;;;; enter-click-focus.jl -- focuses a window when the cursor enters
;;;; a window or when clicking on it.
;; by Dagfinn I. Mannsåker

(provide 'enter-click-focus)

(define-focus-mode 'enter-click
  (lambda (w action)
    (case action
      (when (window-really-wants-input-p w)
        (set-input-focus w)))
       (focus-pop-map w))
      ((focus-out add-window)
       (unless (or (not (window-really-wants-input-p w))
                   (eq w (input-focus)))
         (focus-push-map w click-to-focus-map)))
       (focus-pop-map w))
       (unless (or (not (window-really-wants-input-p w))
                   (eq w (input-focus)))
         (focus-push-map w click-to-focus-map))))))


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