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

Kulig, Mariusz mkulig at psi.pl
Tue Sep 23 03:06:21 EDT 2014


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
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.


Mariusz Kulig

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://icculus.org/pipermail/openbox/attachments/20140923/c88dbe81/attachment.html>

More information about the openbox mailing list