From a1952906005d75206bad013c8cce94949b42da3c Mon Sep 17 00:00:00 2001 From: Vlad Zahorodnii Date: Thu, 14 Oct 2021 20:32:41 +0300 Subject: [PATCH] Simplify AbstractClient::applyWindowRules() Trying to reconstrain the geometry after applying rules is unnecessary because if the geometry is forced using a rule, resizeWithChecks() should not change it; if the window is maximized or has entered fullscreen mode, window gravity is irrelevant. If the window is shaded, this resizeWithChecks() is not needed. This change simplifies AbstractClient::applyWindowRules(), which allows to split adjustedSize() to further simplify geometry handling. --- src/rules.cpp | 4 ---- 1 file changed, 4 deletions(-) diff --git a/src/rules.cpp b/src/rules.cpp index 214b03cb50..607bbb26f0 100644 --- a/src/rules.cpp +++ b/src/rules.cpp @@ -892,10 +892,6 @@ void AbstractClient::applyWindowRules() if (workspace()->mostRecentlyActivatedClient() == this && !client_rules->checkAcceptFocus(true)) workspace()->activateNextClient(this); - // Closeable - QSize s = adjustedSize(); - if (s != size() && s.isValid()) - resizeWithChecks(s); // Autogrouping : Only checked on window manage // AutogroupInForeground : Only checked on window manage // AutogroupById : Only checked on window manage