[openbox] How focus is managed by Openbox with XI2 extension

Dana Jansens danakj at orodu.net
Tue Sep 23 13:01:13 EDT 2014


On Tue, Sep 23, 2014 at 3:06 AM, Kulig, Mariusz <mkulig at psi.pl> wrote:

> Hi
>
> I try to understand  how focus is managed in XI2 environment with multiple
> input devices (MPX). I noticed that Openbox sends *SetInputFocus* request
> to set focus on window which was clicked. Openbox works properly with
> multiple cursors and keyboards from XI2 extension, I can use one master
> device pair to operate on one window and another master pair to operate on
> another window. But Openbox does not use XI2 extension and uses core
> *SetInputFocus* request which does not define device id. In XI2 focus is
> set for the given master keyboard device to the given X window (
> *XISetFocus* method
> http://www.x.org/archive/X11R7.5/doc/man/man3/XIGetFocus.3.html).  I
> think that If server receives *SetInputRequest* request which does not
> contain device id then server shouldn’t know on which device it should set
> focus to the given window. But it works and I have no idea how it works.
> How does server know on which keyboard master device to set the focus?
> Maybe when X server receives *SetInputFocus request *it checks which
> master pointer is on window contained in request and sets focus on master
> keyboard which is a pair of master pointer.  I posted question on superuser
> StackExchange (
> http://superuser.com/questions/813939/how-focus-is-managed-in-x-window-system-with-xi2)
> but It has remained  unanswered.  I used *xscope* to monitor
> communication between X server, Openbox and other clients. May be *xscope*
> does not show everything.
>
> Please explain me how it works.
>

I'm also not sure. I would try looking around in the X server
implementation of SetInputFocus or in XI2's backward compatibility code. I
doubt cursor position has anything to do with it though.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20140923/35ce91f5/attachment.html>


More information about the openbox mailing list