[openbox] focus follows mouse and keybinding raise/lower window
Matthew M. Fitzgibbons
mfitzgib at simla.colostate.edu
Tue May 9 02:40:16 EDT 2006
Mikael Magnusson wrote:
> On Mon, 8 May 2006, Clay Barnes wrote:
>> On 07:07 Tue 09 May , Mikael Magnusson wrote:
>>> On Mon, 8 May 2006, Emile Snyder wrote:
>>>> From the FAQ:
>>>> Q: When I lower, raise or move windows with a keybinding, focus
>>>> follow the mouse!
>>>> A: This is a feature, how large is the chance that the mouse
>>>> accidentally enters a window you want to focus when you move or
>>>> lower/raise something?
>>>> Uhh, for me, 99% because I'm always sending windows to the back of the
>>>> stack to *get at what's behind them*. I've switched to openbox
>>>> because blackbox makes my gnome panel based desktop take forever to
>>>> start up (presumably because it's waiting for a session type
>>>> to time out since blackbox doesn't support sessions?). The focus
>>>> is a deal killer to me.
>>>> Can one of the openbox hackers point me quickly to which source file I
>>>> should poke around in to change this behavior?
>>> If you bind lower to a mouse button, which is reasonable if you want
>>> to change based on the mouse pointer's position, focus will in fact
>>> to the window that the mouse pointer is over after your window has
>>> lowered. If you are working only with the keyboard, how do you make
>>> the mouse pointer is where you want, do you move it first and then
>>> press a
>>> keyboard binding??? Why not use Next/PreviousWindow?
>> Strict ordering regardless of order of focus (including other windows
>> not in the "stack") is a barrier to the next/prev. window idea.
>> And with the mouse, it's possible Emile doesn't have a button to spare.
>> I'm not saying it should be a mainline change, but I do see why an
>> individual change would be warrented.
> Something still seems wrong to me about using the keyboard to lower a
> window because you "do not use the mouse much" and still depend on the
> location of the mouse pointer to determine focus. Maybe you want to
> use virtual desktops? That way you know exactly where every window is
> and can have direct keybinds to them.
> Mikael Magnusson
I find that I often bring a window to the top by keybindings but
actually want to do work in the one below it, which is usually
maximised. (usually happens when viewing terminal output using it to
debug a program in a text editor.) Once the window is raised, I usually
have to move the mouse into the xterm then back into my text editor to
get the right focus.
One possible solution would be to add a Refocus action to rc.xml that I
could put after the other actions for the key binding. The current
behavior wouldn't change, but there would be a way to force focus to
follow the mouse from keybindings if desired. I can write the patch, but
not for several weeks, at least. I'd appreciate any thoughts on the idea.
More information about the openbox