[Xcb] Preventing the X server from sending key events to a child window that is under the mouse

Nicholas Allen nick at bitwig.com
Tue Apr 28 19:01:46 UTC 2020


Hi,

We develop Bitwig Studio DAW for Linux and there is a problem that we are
struggling with and hope someone can help.

When we open a plug-in window on Linux we use XCB to create a parent window
(which is decorated by the window manager). We then ask the VST plug-in to
put its window inside this window (as a child window).

This all works fine in terms of displaying the window. The problem we have
is in dispatching key events. We would like key events to go to our window
when the window is focused so that we can do special actions like play
notes or start the transport. We do get key events when our window is
focused AND the mouse is in the window manager title bar area. However as
soon as the mouse moves inside of the plug-in window we no longer get the
key press or release events.

It seems as though the X server is sending it to the plug-in child window
that wants key events and is current under the mouse cursor. We would like
to just always get the key events to our window as the plug-in APIs have
ways of dispatching key press and release events to the plugins.

Is there some flag or set of window manager hints that we need to set for
this behaviour? I've spent a long time searching to no avail. Any help
would be greatly appreciated!

thanks in advance,

Nicholas Allen
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/xcb/attachments/20200428/b41d0c34/attachment.htm>


More information about the Xcb mailing list