use transientparent directly
ClosedPublic

Authored by mart on May 17 2017, 10:53 AM.

Details

Summary

don't parent directly as we don't want unwanted deletions.
ensure we have a menu, not parented yet, the container exists,
both the menu and the container's toplevel widget QWindows exist,
then set the transient parent of the qmenu's qwindow to the
container's toplevel widget's qwindow. this fixes positioning in
wayland as the protocol requires every popup menu having a transient parent

Test Plan

okular doesn't crash anymore, konsole's bookmarks menu still
correctly positioned in wayland

Diff Detail

Repository
R263 KXmlGui
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
mart created this revision.May 17 2017, 10:53 AM
Restricted Application added a project: Frameworks. · View Herald TranscriptMay 17 2017, 10:53 AM
Restricted Application added a subscriber: Frameworks. · View Herald Transcript
mart updated this revision to Diff 14630.May 17 2017, 11:00 AM

call windid only once

I'll test this and see how it goes.

lbeltrame accepted this revision.May 17 2017, 11:42 AM

Tested, works (neither kontact nor okular crash with this change).

This revision is now accepted and ready to land.May 17 2017, 11:42 AM
This revision was automatically updated to reflect the committed changes.