Use move resize geometry in AbstractClient::applyWindowRules()
Abstract clients tolerate passing the shaded window geometry to moveResize(). But the main issue with applyWindowRules() is that it uses the current frame geometry even though it calls moveResize(). It's not a big deal but it's error prone. This change ports applyWindowRules() to the move resize geometry, which makes code more straightforward and ensures that kwin uses right geometry type with moveResize().
This commit is contained in:
parent
368bbde1ff
commit
cc98001d4c
1 changed files with 5 additions and 4 deletions
|
@ -862,10 +862,11 @@ void AbstractClient::applyWindowRules()
|
|||
// Placement - does need explicit update, just like some others below
|
||||
// Geometry : setGeometry() doesn't check rules
|
||||
auto client_rules = rules();
|
||||
QRect orig_geom = QRect(pos(), implicitSize()); // handle shading
|
||||
QRect geom = client_rules->checkGeometry(orig_geom);
|
||||
if (geom != orig_geom)
|
||||
moveResize(geom);
|
||||
const QRect oldGeometry = moveResizeGeometry();
|
||||
const QRect geometry = client_rules->checkGeometry(oldGeometry);
|
||||
if (geometry != oldGeometry) {
|
||||
moveResize(geometry);
|
||||
}
|
||||
// MinSize, MaxSize handled by Geometry
|
||||
// IgnoreGeometry
|
||||
setDesktops(desktops());
|
||||
|
|
Loading…
Reference in a new issue