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.
This commit is contained in:
Kai Uwe Broulik 2023-08-16 20:38:42 +02:00
parent adae140d57
commit 74b68a63b5
3 changed files with 3 additions and 5 deletions

View file

@ -481,9 +481,7 @@ void Placement::placeOnScreenDisplay(Window *c, const QRect &area)
void Placement::placeTransient(Window *c) void Placement::placeTransient(Window *c)
{ {
const auto parent = c->transientFor(); c->moveResize(c->transientPlacement());
const QRectF screen = Workspace::self()->clientArea(parent->isFullScreen() ? FullScreenArea : PlacementArea, parent);
c->moveResize(c->transientPlacement(screen));
} }
void Placement::placeDialog(Window *c, const QRect &area, PlacementPolicy nextPlacement) void Placement::placeDialog(Window *c, const QRect &area, PlacementPolicy nextPlacement)

View file

@ -2244,7 +2244,7 @@ bool Window::hasTransientPlacementHint() const
return false; return false;
} }
QRectF Window::transientPlacement(const QRectF &bounds) const QRectF Window::transientPlacement() const
{ {
Q_UNREACHABLE(); Q_UNREACHABLE();
return QRectF(); return QRectF();

View file

@ -949,7 +949,7 @@ public:
* Only valid id hasTransientPlacementHint is true * Only valid id hasTransientPlacementHint is true
* @returns The position the transient wishes to position itself * @returns The position the transient wishes to position itself
*/ */
virtual QRectF transientPlacement(const QRectF &bounds) const; virtual QRectF transientPlacement() const;
const Window *transientFor() const; const Window *transientFor() const;
Window *transientFor(); Window *transientFor();
void setTransientFor(Window *transientFor); void setTransientFor(Window *transientFor);