Move code on wayland surface being created.
ClosedPublic

Authored by davidedmundson on May 7 2017, 5:33 PM.

Details

Summary

We need to setup our attachments when the wl_surface is created.
This gets recreated when a window is hidden and shown.

QPlatformSurfaceCreated is emitted once, when the backing store is created,
not when the wl_surface is created, despite it's similar sounding name.

QEvent::Show is too soon, as this is before the platform gets setVisible
We do however, always get an expose event. QEvent::Hide weirdly comes after
the platform has done its thing.

Expose is called whilst we are in QWaylandWindow::setVisible, so before the initial surface has been committed, so we still have perfect frames.

Test Plan

See attached test
Still has window decos after hide/show

Ran on Qt 5.9 and Qt 5.7

Diff Detail

Repository
R135 Integration for Qt applications in Plasma
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
davidedmundson created this revision.May 7 2017, 5:33 PM
Restricted Application added a project: Plasma. · View Herald TranscriptMay 7 2017, 5:33 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
davidedmundson edited the summary of this revision. (Show Details)May 7 2017, 10:23 PM
davidedmundson edited the test plan for this revision. (Show Details)
graesslin added inline comments.
src/platformtheme/kwaylandintegration.cpp
39

I don't really like the name of the variable as it's going to be the future way and not "a workaround" once we depend on Qt 5.8 or later.

Remove leftover code

graesslin accepted this revision.May 8 2017, 4:00 PM
graesslin added inline comments.
src/platformtheme/kwaylandintegration.cpp
157

Just wondering: why is the moc file needed now?

This revision is now accepted and ready to land.May 8 2017, 4:00 PM
This revision was automatically updated to reflect the committed changes.