use transientparent directly

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

Description

use transientparent directly

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

Reviewers: lbeltrame

Reviewed By: lbeltrame

Subscribers: lbeltrame, Frameworks

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D5900

Details

Committed
martMay 17 2017, 11:42 AM
Reviewer
lbeltrame
Differential Revision
D5900: use transientparent directly
Parents
R263:c2a98298acb5: GIT_SILENT Upgrade KF5 version to 5.35.0.
Branches
Unknown
Tags
Unknown
Reverted By
R263:78e572dadf64: Revert "use transientparent directly"