[effects] Support xcbConnectionChanged for support properties

Authored by graesslin on Sep 10 2017, 2:56 PM.



Several effects announce a support property atom on the root window. This
change forwards the KWin::Application's signal that the xcbConnection
changed to the EffectsHandler so that the effects can respond to it.

All effects which announce a support property connect to this new signal
and re-announce the property. In case the xcb connection died (future
XWayland crashing case) it is set to XCB_ATOM_NONE by that. In case the
xcb connection got created (future delayed XWayland startup) the atom is
set to the proper value.

In addition all usages of the support properties are guarded, so that no
nonesense actions are performed if the support property is XCB_ATOM_NONE.

Test Plan

Only compile tested as we don't have XFree KWin yet

Diff Detail

R108 KWin
Automatic diff as part of commit; lint not applicable.
Automatic diff as part of commit; unit tests not applicable.
graesslin created this revision.Sep 10 2017, 2:56 PM
Restricted Application added a project: KWin. · View Herald TranscriptSep 10 2017, 2:56 PM
Restricted Application added subscribers: kwin, plasma-devel. · View Herald Transcript
davidedmundson requested changes to this revision.Sep 10 2017, 3:52 PM
davidedmundson added a subscriber: davidedmundson.
davidedmundson added inline comments.

we should only announce this
if ((shader && shader->isValid())


same here.

This revision now requires changes to proceed.Sep 10 2017, 3:52 PM
graesslin updated this revision to Diff 19381.Sep 10 2017, 7:52 PM
graesslin edited edge metadata.

Addressed David's comments

Restricted Application edited projects, added Plasma; removed KWin. · View Herald TranscriptSep 10 2017, 7:52 PM
davidedmundson accepted this revision.Sep 10 2017, 7:59 PM
davidedmundson added inline comments.

I was expecting you to do what you for the present windows effect with calling your local lambda announceSupportProperties.

IMHO it's neater than duplicating - but this is fine too.

This revision is now accepted and ready to land.Sep 10 2017, 7:59 PM
graesslin added inline comments.Sep 10 2017, 8:04 PM

I didn't go for the lambda here as the if statement above does also the Wayland registering. So at least the if would have been needed to be duplicated anyway.

This revision was automatically updated to reflect the committed changes.