[openbox] Focus between X displays

Dana Jansens dana at orodu.net
Thu Sep 16 21:20:51 EDT 2010


On Mon, Sep 6, 2010 at 1:47 AM, Simon Perry <openbox at sanxion.net> wrote:
> Hi everyone,
>
> I've recently moved to Openbox from plain old Metacity, and I'm loving
> it so far.
>
> After a lot of doc reading and Googling, I have been unable to determine
> a way to change certain behaviour which I was used to in Metacity.
>
> Consider this setup:
>
> - 2 separate X displays (NVidia card but not using TwinView)
> - Display 0 runs normal desktop stuff
> - Display 1 runs a fullscreen RDP session to a Windows VM
> - Sloppy mouse focus or focus-follows-mouse is not enabled
>
> In Metacity, whenever I moved the mouse between displays, focus was
> given to that display. Even if there wasn't a window on the display
> that you moved to, it would always cause the other display to lose
> focus.
>
> Very nice behaviour. I did not need any "sloppy focus" or follow-mouse
> setting enabled for this to work (I hate sloppy focus except for this
> one case) -- I always knew which "screen" had focus based on where the
> mouse was.
>
> Anyway, in Openbox, display 1 is "unmanaged" (i.e. no Openbox running on
> display :0.1). When I move the mouse from 0 to 1, the fullscreen app on
> display 1 gets focus - no drama there.
>
> When I move back to display 0, display 1 keeps focus and I have to click
> somewhere on display 0 for display 1 to lose focus.
>
> It appears the only way to consistently change focus when moving between
> displays is to enable follow mouse for everything, and I can't see any
> way of emulating Metacity's behaviour.
>
> If anyone could let me know how to achieve Metacity-style behaviour for
> this, if it's in fact possible, that'd be appreciated as I can't stand
> sloppy mouse for everything. :)

There's no "focus when the mouse enters the screen" option.  And
Openbox tries to be quite polite and not steal focus from other
screens - usually if focus is on another screen it's cuz you are using
stuff there.

If I were setting this up, I'd use
twinview/xinerama/whatever-it's-called-these-days.  Then you could
just alt-tab or whatever to other windows.

I don't quite understand the focus paradigm of "click to focus on all
windows except one which has sloppy focus, and then turns sloppy focus
on for one more focus switch".  Maybe you need some hooks and changing
config options on the fly or something.. but this sort of thing can't
be done directly I think with Openbox as it is right now.

If you have the monitors together as one screen, and Openbox is
running on both, you could also use a "Unfocus" keybinding to move
focus off the window in question.  There's lots of actions available
that might help you out, but they don't work across separate X
displays/screens.


- Dana


> Cheers.
>
> --
> Simon Perry (aka Pezz)
>
> _______________________________________________
> openbox mailing list
> openbox at icculus.org
> http://icculus.org/mailman/listinfo/openbox
>


More information about the openbox mailing list