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:
parent
adae140d57
commit
74b68a63b5
3 changed files with 3 additions and 5 deletions
|
@ -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)
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue