Simplify Placement::placeMaximizing()
Window::maximize() maximizes the window regardless of size constraints. If the window can't be maximized, just fallback to the default (centered) placement policy.
This commit is contained in:
parent
3f698ab446
commit
a83cd5bf2f
1 changed files with 2 additions and 8 deletions
|
@ -569,15 +569,9 @@ void Placement::placeMaximizing(Window *c, const QRect &area, PlacementPolicy ne
|
|||
if (nextPlacement == PlacementUnknown) {
|
||||
nextPlacement = PlacementCentered;
|
||||
}
|
||||
if (c->isMaximizable() && c->maxSize().width() >= area.width() && c->maxSize().height() >= area.height()) {
|
||||
if (workspace()->clientArea(MaximizeArea, c) == area) {
|
||||
c->maximize(MaximizeFull);
|
||||
} else { // if the geometry doesn't match default maximize area (xinerama case?),
|
||||
// it's probably better to use the given area
|
||||
c->moveResize(area);
|
||||
}
|
||||
if (c->isMaximizable()) {
|
||||
c->maximize(MaximizeFull);
|
||||
} else {
|
||||
c->moveResize(c->resizeWithChecks(c->moveResizeGeometry(), c->maxSize().boundedTo(area.size())));
|
||||
place(c, area, nextPlacement);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue