[xcb] Ensure the compositingChanged signal is emitted if NETEventFilter is recreated

Review Request #128576 - Created Aug. 2, 2016 and submitted

Martin Flöser
kdeframeworks, plasma
The Xcb implementation of KWindowSystem has two operations modes and when
switching between the two it recreates the NETEventFilter.

This could result in the compositingChanged signal never to be emitted if:
1) NETEventFilter gets created before compositor is started
2) NETEventFilter gets recreated after compositor is started but before
   the old filter had a chance to process the XFixes event

This was the cause for e.g. plasmashell not properly detecting that a
Compositor is running on X11.

This change ensures that the signal is emitted if the compositing state
differs after the recreation. Also a test case is added which simulates
the condition.

BUG: 362531



  • 0
  • 0
  • 1
  • 1
Description From Last Updated
Andreas Sturmlechner
Marco Martin
Martin Flöser
Review request changed

Status: Closed (submitted)

Change Summary:

Submitted with commit 4d355569eea2fae76ed67f791db8abeec1e794f0 by Martin Gräßlin to branch master.
Kai Uwe Broulik
kwindowsystem master fails to build:

kwindowsystem/src/platforms/xcb/kwindowsystem.cpp:441:48: error: ‘class NETEventFilter’ has no member named ‘compositingEnabled’
         const bool wasCompositing = s_d ? s_d->compositingEnabled : false;
  1. Please drop the patch https://git.reviewboard.kde.org/r/128566/

  2. Ah, yeah, still had that one, sorry for the noise, works.

Anthony Fieroni

src/platforms/xcb/kwindowsystem.cpp (Diff revision 1)

This line must be
if (s_d && wasCompositing != s_d->compositingEnable) {

  1. why do you think so?

  2. Mistake, d must be setted with sure.