[Plasma Dialog] Use QXcbWindowFunctions for setting window types Qt WindowFlags don't knows
ClosedPublic

Authored by broulik on Dec 14 2019, 5:48 PM.

Details

Summary

... but Qt XCB knows, such as Notifications type.
This ensures QXcbWindow keeps the correct window types around.
Only for types that aren't in NET WM like OSD and Critical Notifications will it have to fall back to KWindowSystem.
It also just uses it directly on Wayland.

Test Plan
  • OSD and notifications still work
  • Window type no longer changes when changing messing with window flags on a notification window, obsoleting D25832

Diff Detail

Repository
R242 Plasma Framework (Library)
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
broulik created this revision.Dec 14 2019, 5:48 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptDec 14 2019, 5:48 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
broulik requested review of this revision.Dec 14 2019, 5:48 PM
davidedmundson accepted this revision.Dec 15 2019, 3:25 PM
davidedmundson added a subscriber: davidedmundson.

I think we need to look at our direction of KWindowSystem long term, but in terms of what actually happens this makes complete sense.

Better to set the right type once, than to constantly set and reset the same thing, sending garbage data over the wire.

src/plasmaquick/dialog.cpp
728

Personally, I prefer Q_ASSERT + return as you get to catch when a future mistake happens.
Whereas with Q_UNREACHABLE you get literally undefined behaviour as the compiler will optimise this out the jump map.

(not that it really matters...it is unreachable)

This revision is now accepted and ready to land.Dec 15 2019, 3:25 PM
This revision was automatically updated to reflect the committed changes.