How to send XI2 events from a client to the other client(s) ?
Park Sung-Jin
input.hacker at gmail.com
Thu Aug 26 05:02:40 PDT 2010
Hi...
My Xorg server and applications are running on mobile environment.
Most of application windows are full screen and some application can get
some keys
even if they are not on the top of window stack.
In the past, I used XGrabKey to get some keys in an application which was on
the bottom of window stack.
Keys were delivered properly but everytime they delivered, focus window
changed also.
So the application which contains focused window received focus-out and
focus-in events
when every key delivered to other application window.
So I chose that one special application grab all key events and delivered
the events to the proper window via XSendEvent().
2010/8/26 Daniel Stone <daniel at fooishbar.org>
> Hi,
>
> On Thu, Aug 26, 2010 at 07:11:04PM +0900, Park Sung-Jin wrote:
> > I'd like to know how to send XI2 events (such as XI_KeyPress,
> XI_KeyRelease)
> > from a client to the other client(s).
> >
> > I'm working on 1.8.0 version of Xorg server and have a special
> application.
> > The special application (which grabs all slave key devices except
> > XTestKeyboard) receives every key event and delivers it to the proper
> > client's window.
> >
> > Most of the other applications are ready to receive KeyPress/KeyRelease
> > event(s).
> > So XSendEvent() was used for deliverying the key event in the first
> time...
> > but some applications only can receive XI2 events (such as
> > XI_KeyPress/XI_KeyRelease) and they want to get the key events
> > when they're not on the top of window stack (eg. background application).
> >
> > I tried to send XI2 key events using XSendExtension() but I realized the
> > function was not proper for sending XI2 (Generic) events.
> >
> > I really appreciate your helps in advance.
> > Thanks :)
>
> Why not just implement a proper focus policy from your WM?
>
> Cheers,
> Daniel
>
> -----BEGIN PGP SIGNATURE-----
> Version: GnuPG v1.4.10 (GNU/Linux)
>
> iEYEARECAAYFAkx2VBIACgkQUVYB1rKAgJSOcgCglgoQ1tIVgw6EUpV7H6gOUCC4
> xtEAn1EIF+rOaRqeh+KAt2aB3Fs18IZp
> =bjS/
> -----END PGP SIGNATURE-----
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20100826/41380781/attachment.html>
More information about the xorg-devel
mailing list