[openbox] sloppy focus "stealing"

Anthony Thyssen A.Thyssen at griffith.edu.au
Tue May 24 02:00:56 EDT 2011


On Mon, 23 May 2011 20:35:39 +0100 (BST)
Freddie <freddie_signup at gmx.co.uk> wrote:
| On Mon, 23 May 2011, Anthony Thyssen wrote:
| 
| >
| > Actually there are a low of situations where focus fails to follow mouse.
| >
| > Here are a few known situations....
| >
| >  *  window mouse was in resizes so mouse is no longer in window
| >     The resize is typically caused by key input of some kind.
| >     In my case a image display window with shrink image key presses.
| >     The focus remains attached to original shrinking window
| >     This is sometimes a good thing.
| >
| >  * Window closers or non-window manager moves of windows.
| >
| >  * External program (event popup) forces a focus change.
| >    Window management tools like xwit, xdotool etc can do this!
| >    (again sometimes a good thing, other times not)
| >
| >
| > Typically when the mouse-focus is wrong it remains wrong until the mouse
| > moves across a window border.  As such I find myself 'jiggling' the mouse
| > back and forth to recover desired focus.
| >
| 
| I believe the intention was to point out that when the mouse moves then 
| the focus follows it, when the focus moves (window resized/moved/closed by 
| non-mouse event, focus grabbed by other program) the mouse doesn't follow 
| it. In that sense the focus always follows the mouse but the mouse doesn't 
| follow focus.
| 
| Greetings,
| 
| Freddie
| 
Correct.

However is strict mouse focus was desired (I don't) then you will
need to include mouse warping, and possibly some method of finding
is any part of the 'focus' window was actually visible, unless you
also force auto-raise.

I have had situations where a window grabbed focus but was hidden behind
other windows! Especially behind that full screen video player that
currently covers everything on screen! 

Basically there are many degrees of what constitutes 'focus follows
mouse', and I would like to see more control over what situations that
causes a re-focus. Beyond just the mouse moves over a window edge.

I have already added many additional 'focus' actions to the original
rc.xml to better 'follow mouse', but there are other situations that
the rc.xml does not cover.

For example when De-iconifing a window, I get 'focus' being set,
regardless of if mouse is in that window. (focusNew is set to "no"
but this is not a new window :-)

A 'focus if mouse in window' action would in many cases be better than
just a simple direct and forced 'focus' action for this type of event
handling.

Mind you there does not seem to be an event handler for this process in
the "rc.xml", though OpenBox must know about these events.


ASIDE: I have also noted that a 'Drag' action does not work for 'Icon',
'Iconify', 'Maximize', or the 'Close', title bar contexts!


  Anthony Thyssen ( System Programmer )    <A.Thyssen at griffith.edu.au>
 --------------------------------------------------------------------------
  "Where's the kaboom? There was supposed to be an EARTH-shattering kaboom!"
                                                        -- Marvin Martin
 --------------------------------------------------------------------------
   Anthony's Castle     http://www.ict.griffith.edu.au/anthony/


More information about the openbox mailing list