[openbox] an alternative to underMouse, was: Re: [openbox] MoveToEdge loses focus in 3.4.4

Brian de Alwis bsd at cs.ubc.ca
Thu Aug 16 19:11:11 EDT 2007

I *was* having similar focus issues as Andrei.  I bind W-F1 to
RaiseLower and the W-arrows to MoveToEdge*, and use them very
frequently for moving windows about.  I couldn't get them to both
work without Dana's focus_oddity.diff patch combined with
<underMouse>yes</underMouse> and using the Activate action in the
W-{Left,Right,Up,Down}.  So my W-{Left,Right,Up,Down} bindings now
look like the following:

  <keybind key="W-Left">
    <action name="MoveToEdgeWest"/>
    <action name="Activate"/>

But I'm finding that when using the combinations, the focus is
sometimes lost from the moving window and being wrongly transferred
to the underlying window.  I've just realized that this occurs when
moving something like an xterm that is on top of an Eclipse or
Firefox window.  Consider the following example, where the asterisk
indicates the mouse pointer:

    | Firefox         |
    |      +---------------+
    |      |               |
    |      |   *   xterm   |
    |      |               |
    |      +---------------+
    |                 |

Hitting W-Left until the xterm slides out from under the mouse will
cause the xterm to lose focus to Firefox.  It's 100 % reproducible
-- moving xterm over an xterm is fine, but xterm over Firefox or
Eclipse always loses focus to the Firefox/Eclipse window.

I think I'd prefer an explicit Refocus action that would focus to
the window under the mouse.  Then I would:

  * change to <underMouse>no</underMouse>
  * change W-F1's RaiseLower to be followed by a Refocus
  * change W-arrows to remove the Activate

I think this is cleaner (the combination of underMouse=yes and use
of Activate seems contradictory), and might even allow getting rid
of Activate?


On 2007.08.05 12:12:48 -0400, Dana Jansens wrote:
> On 8/5/07, Andrei Paskevich <andrei at capet.iut-fbleau.fr> wrote:
> > With Unfocus and FocusToBottom, I can't achieve this.
> >
> > Still, the option underMouse could be useful, to give focus
> > to the windows which self-raise under the pointer. I'm not
> > sure whether somebody might want it, though.
> Try this ! (With your old bindings.)

  Brian de Alwis | Software Practices Lab | UBC | http://www.cs.ubc.ca/~bsd/
      "Amusement to an observing mind is study." - Benjamin Disraeli

More information about the openbox mailing list