Re: focusing unfocused windows with a click when focus mode is enter-only
- From: "Andrea Vettorello" <andrea vettorello gmail com>
- To: sawfish-list gnome org
- Subject: Re: focusing unfocused windows with a click when focus mode is enter-only
- Date: Thu, 6 Mar 2008 22:12:22 +0100
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:
> > http://bugzilla.gnome.org/show_bug.cgi?id=72238
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
((pointer-in)
(when (window-really-wants-input-p w)
(set-input-focus w)))
((focus-in)
(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)))
((before-mode-change)
(focus-pop-map w))
((after-mode-change)
(unless (or (not (window-really-wants-input-p w))
(eq w (input-focus)))
(focus-push-map w click-to-focus-map))))))
--
Andrea
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]