[xembedsniproxy] Fix check whether to use XTest
ClosedPublic

Authored by wbauer on May 31 2017, 10:52 AM.

Details

Summary

Because of C++'s operator precedence, '!' logically negated all_event_masks only instead of the whole expression.
This resulted in the condition always being false and XTest never being used.

Adding a pair of brackets fixes it.

BUG: 362941
BUG: 375017

Test Plan

Verifed with debug output that XTest is being used when XCB_EVENT_MASK_BUTTON_PRESS is not set in all_event_masks.

Tested with a couple of applications:

  • mplayerc.exe: wine app, worked before, no XTest, still works
  • tvbrowser, jedit, jitsi 2.8: java apps, didn't work before, use XTest now and work
  • ksensors, ksteak, kconnections, klinpopup, ktvschedule: KDE3 apps, worked before, no XTest, still work
  • wammu: python/wxWidgets app, worked before, no XTest, still works
  • grip, avidemux2, hexchat: gtk2 apps, worked before, no XTest, still work
  • audacious, stardict: gtk3 apps, didn't work before (unless GDK_CORE_DEVICE_EVENTS=1 was set), work now using XTest (without GDK_CORE_DEVICE_EVENTS=1)

Diff Detail

Repository
R120 Plasma Workspace
Lint
Lint Skipped
Unit
Unit Tests Skipped
wbauer created this revision.May 31 2017, 10:52 AM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 31 2017, 10:52 AM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson accepted this revision.May 31 2017, 10:54 AM

Oh you hero!
I can't believe I wrote the code, tested it, then failed when putting it together.

This revision is now accepted and ready to land.May 31 2017, 10:54 AM

Is it ok to commit it to the 5.10 branch as well?

Btw, I think the whole fix should probably be backported to 5.8 too...

Is it ok to commit it to the 5.10 branch as well?

Yes

Btw, I think the whole fix should probably be backported to 5.8 too...

It introduces a new dependency :/

Btw, I think the whole fix should probably be backported to 5.8 too...

It introduces a new dependency :/

Really?
AFAICS it only additionaly links xembedsniproxy against XTst.

But ok, I'm not completely sure about the policies in this regard.

This revision was automatically updated to reflect the committed changes.