diff options
authorDavid Edmundson <[email protected]>2018-10-23 12:18:03 +0100
committerDavid Edmundson <[email protected]>2018-10-23 12:37:10 +0100
commitbdf348c603b8e342af2d6c97ab42b3703fd02813 (patch)
parent655d8af8be7dc5abeea3f01b1dd53b136282cc98 (diff)
[wayland] Set better placement for XDG Toplevels
Summary: XDG Popups will have a transient parent and positional information. XDG Toplevels can have a transient parent without having positional information. Currently we set that we have a transient placement hint of 0,0 which means the newly opened children go to the top left of the parent. This new code paths treat child top levels as dialogs centering them to the parent. BUG: 393167 Test Plan: Dolphin help->about Appeared where it does on X Reviewers: #kwin, zzag Reviewed By: #kwin, zzag Subscribers: zzag, kwin Tags: #kwin Differential Revision: https://phabricator.kde.org/D16293
1 files changed, 2 insertions, 0 deletions
diff --git a/placement.cpp b/placement.cpp
index 7f569a1..d11c2eb 100644
--- a/placement.cpp
+++ b/placement.cpp
@@ -74,6 +74,8 @@ void Placement::place(AbstractClient* c, QRect& area)
placeOnScreenDisplay(c, area);
else if (c->isTransient() && c->hasTransientPlacementHint())
+ else if (c->isTransient() && c->surface())
+ placeDialog(c, area, options->placement());
place(c, area, options->placement());