Re: Broken enter-exit focus behavior in 1.5.3

Am Tue, 1 Dec 2009 21:31:03 +0200
schrieb Timo Korvola <Timo Korvola iki fi>:

> On Tuesday 01 December 2009 07:11:47 sand blarg net wrote:
> > The cursor changes to the selection cursor, and the terminal window 
> loses focus.
> I see.  select-window grabs the pointer, causing LeaveNotify and 
> EnterNotify events with mode NotifyGrab.  The LeaveNotify event is 
> ignored but when enter-exit mode is invoked with parameter
> enter-root, it does not ignore grab-related events.  Thus focus is
> directed to the root or desktop window.  When the grab ends, the
> induced LeaveNotify and EnterNotify events are ignored, so focus
> remains in the root window.
> Possible solutions include making the enter-root handling also ignore 
> grab-related events, in which case focus remains where it was when 
> select-window was invoked (although the pointer may have moved), or 
> making the enter-exit focus mode not ignore any grab-related
> EnterNotify events, if that feels more natural.  To me it doesn't.
> Then again I don't use enter-exit mode (I used enter-only prior to
> enter-click).

Well atleast the misstakes Derek found should be undone before 1.6.0,
In most cases I noticed it with Virtualbox, but not to often, either
way it's really a bit annoying. 

I just tried VirtualBox 3.1.0 AND: If you have the GuestAdditions
installed (in the guest of course) and are outside of the guestwindow,
all keybindings are sent the host, but NEW NEW NEW: if you're inside the
guestwindow the keybindings are sent to the guest (finally).

> >   (bind-keys window-keymap
> >              "A-F8" 'resize-window-interactively)
> This also grabs the pointer, so the mechanism is likely the same.
> >   (define (focus-enter-refocus-fun w mode)
> >     (focus-revert))
> >   (add-hook 'enter-notify-hook focus-enter-refocus-fun t)
> This is misguided.  focus-revert is intended for cases where the
> window in focus disappears.  If you want to change the focusing
> logic, change the focus mode.

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