From 74b68a63b558be401b1a83d8f440e73bcb9f1510 Mon Sep 17 00:00:00 2001 From: Kai Uwe Broulik Date: Wed, 16 Aug 2023 20:38:42 +0200 Subject: [PATCH] Drop bounds argument from transientPlacement XdgPopupWindow disregards it for the most part anyway and asks workspace for the placement area directly. Also gives XdgPopupWindow more control on the placement when it's all contained inside of it for the upcoming commit. --- src/placement.cpp | 4 +--- src/window.cpp | 2 +- src/window.h | 2 +- 3 files changed, 3 insertions(+), 5 deletions(-) diff --git a/src/placement.cpp b/src/placement.cpp index 17cb558de0..183e208add 100644 --- a/src/placement.cpp +++ b/src/placement.cpp @@ -481,9 +481,7 @@ void Placement::placeOnScreenDisplay(Window *c, const QRect &area) void Placement::placeTransient(Window *c) { - const auto parent = c->transientFor(); - const QRectF screen = Workspace::self()->clientArea(parent->isFullScreen() ? FullScreenArea : PlacementArea, parent); - c->moveResize(c->transientPlacement(screen)); + c->moveResize(c->transientPlacement()); } void Placement::placeDialog(Window *c, const QRect &area, PlacementPolicy nextPlacement) diff --git a/src/window.cpp b/src/window.cpp index 65ab382b37..8b855bd035 100644 --- a/src/window.cpp +++ b/src/window.cpp @@ -2244,7 +2244,7 @@ bool Window::hasTransientPlacementHint() const return false; } -QRectF Window::transientPlacement(const QRectF &bounds) const +QRectF Window::transientPlacement() const { Q_UNREACHABLE(); return QRectF(); diff --git a/src/window.h b/src/window.h index cd146e0f0d..9a61801aa7 100644 --- a/src/window.h +++ b/src/window.h @@ -949,7 +949,7 @@ public: * Only valid id hasTransientPlacementHint is true * @returns The position the transient wishes to position itself */ - virtual QRectF transientPlacement(const QRectF &bounds) const; + virtual QRectF transientPlacement() const; const Window *transientFor() const; Window *transientFor(); void setTransientFor(Window *transientFor);