[Dialog] Set PlasmaShellSurface on PlasmaShell being announced
AbandonedPublic

Authored by romangg on May 22 2018, 11:38 AM.

Details

Reviewers
None
Group Reviewers
Plasma
Maniphest Tasks
T8771: PlasmaQuick::Dialog and/or KWin (internal window) problems
Summary

Dialog might try to set PlasmaShellSurface before Wayland Server has sent
the PlasmaShell proxy to DialogShadows. This can be observed with KWin's
TabBox.

Connect to DialogShadows new signal waylandPlasmaShellInterfaceAnnounced
in case the PlasmaShell interface has not yet been announced.

Test Plan

Manual debug statement shows that DialogPrivate::shellSurface is set.

Diff Detail

Repository
R242 Plasma Framework (Library)
Branch
waitOnSetupWayland
Lint
No Linters Available
Unit
No Unit Test Coverage
romangg created this revision.May 22 2018, 11:38 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 22 2018, 11:38 AM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
romangg requested review of this revision.May 22 2018, 11:38 AM

This doesn't make sense (assuming everything else works correctly, which clearly isn't the case)

registry->setup();
connection->roundtrip();

should mean the server will announce all the interfaces and we block all execution until we've processed it all.

which means we "know" by the time we finish DialogShadows::Private::setupWaylandIntegration() we know plasmaShellAnnounced will have been emitted and that the plasmashell has been set. That's how it works in the regular case.

roundTrip goes via the QPA, and that has been implemented in Kwin's QPA.

should mean the server will announce all the interfaces and we block all execution until we've processed it all.

DialogShadows is created as Q_GLOBAL_STATIC. Maybe that's why it's not blocking for the Dialog object initializing it.

Also wouldn't it be a deadlock if execution of KWin is stopped until the Wayland server, i.e. KWin, has processed all events? Or is the Tabbox QML code running in a different thread?

I wouldn't change plasmaquick based on KWin's behavior. KWin is weird after all. We should rather work around inside KWin.

romangg abandoned this revision.Jun 10 2018, 8:06 PM

Abandoned in favor of D13084.