Inject mouse clicks from SNI to xembedded icons with XTest
ClosedPublic

Authored by davidedmundson on Mar 23 2017, 6:11 PM.

Details

Summary

A certain toolkit doesn't register for mouse press release events
because it now uses XI2 only.

Injecting those directly to the window is too difficult, fortunately in
the GTK3 case we can use XTest to send an event. Something I had
previously chosen against using because it didn't work with something
else (can't remember what). I now have a bit of code choosing which
method to use, which will hopefully cover all cases.

Code is a bit convuluted because the xcb version of xtest doesn't have
the high-level method I want to use in it's API, so I just used Xlib
version.

CCBUG: 375017
CCBUG: 362941

Test Plan

Ran my usual bunch of test apps:

  • xchat
  • a GTK3 systray demo I made
  • skype (A Qt4 app without SNI patches)

All worked as before

Diff Detail

Repository
R120 Plasma Workspace
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
davidedmundson created this revision.Mar 23 2017, 6:11 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMar 23 2017, 6:11 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
anthonyfieroni added inline comments.
xembed-sni-proxy/sniproxy.cpp
81

You mean Direct here, no?

graesslin accepted this revision.Mar 24 2017, 6:14 AM
graesslin added a subscriber: graesslin.

meh

This revision is now accepted and ready to land.Mar 24 2017, 6:14 AM
davidedmundson marked an inline comment as done.Mar 24 2017, 9:31 AM
davidedmundson added inline comments.
xembed-sni-proxy/sniproxy.cpp
81

I do, good catch.

This revision was automatically updated to reflect the committed changes.
davidedmundson marked an inline comment as done.