wayland: Move or resize xdg-toplevel window during initialization only if geometry is enforced by a window rule
move() and resize() functions are not convenience helpers around the moveResize() function. They communicate what kwin wants to see after the corresponding change is applied. It's needed to make asynchronous geometry updates work. This change replaces a moveResize() during XdgToplevelClient initialization with explicit move() and resize() function calls instead, so it's more clear what the expected end result is.
This commit is contained in:
parent
fed45422cf
commit
b26227348c
1 changed files with 10 additions and 1 deletions
|
@ -1367,7 +1367,16 @@ void XdgToplevelClient::initialize()
|
|||
|
||||
setupWindowRules(false);
|
||||
|
||||
moveResize(rules()->checkGeometry(frameGeometry(), true));
|
||||
// Move or resize the window only if enforced by a window rule.
|
||||
const QPoint forcedPosition = rules()->checkPosition(invalidPoint, true);
|
||||
if (forcedPosition != invalidPoint) {
|
||||
move(forcedPosition);
|
||||
}
|
||||
const QSize forcedSize = rules()->checkSize(QSize(), true);
|
||||
if (forcedSize.isValid()) {
|
||||
resize(forcedSize);
|
||||
}
|
||||
|
||||
maximize(rules()->checkMaximize(initialMaximizeMode(), true));
|
||||
setFullScreen(rules()->checkFullScreen(initialFullScreenMode(), true), false);
|
||||
setOnActivities(rules()->checkActivity(activities(), true));
|
||||
|
|
Loading…
Reference in a new issue