summaryrefslogtreecommitdiff
path: root/src/events/Windows.cpp
diff options
context:
space:
mode:
authorVaxry <vaxry@vaxry.net>2023-12-18 14:45:20 +0000
committerVaxry <vaxry@vaxry.net>2023-12-18 14:45:20 +0000
commit460a326c9020f1e9a6bf4157b5a8f1d560b5b536 (patch)
treef6788c6aa74b3e13ddc3a310709aae0e534967a4 /src/events/Windows.cpp
parent403fd7d9f6b160dec71456c9fb195a4199134eff (diff)
Revert "xdgshell: set predicted tiled windows to monitor res size pre-map"
This reverts commit 763d5fa05f7d0191182a1d6cd827415a65293f99. Some issues and fixes #4185
Diffstat (limited to 'src/events/Windows.cpp')
-rw-r--r--src/events/Windows.cpp37
1 files changed, 1 insertions, 36 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index a7e42b35..46427166 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -791,42 +791,7 @@ void Events::listener_ackConfigure(void* owner, void* data) {
void Events::listener_commitWindow(void* owner, void* data) {
CWindow* PWINDOW = (CWindow*)owner;
- if (!PWINDOW->m_bIsMapped) {
-
- // dupes shouldn't happen, but you never know, really.
- if (PWINDOW->m_bInitialCommitPassed || PWINDOW->m_bIsX11)
- return;
-
- PWINDOW->m_bInitialCommitPassed = true;
-
- // this is an initial commit of a surface
- // in here, the surface will ask us what size we'd like it to be.
- // wlroots by default doesn't send anything, so the app can use its preferred floating size
- // if we predict it will be tiled, it's better to set it to the monitor size
- // so it doesn't appear with the wrong size at the beginning.
- // too big > too small, because will be clipped and won't look that bad.
-
- auto willFloat = g_pXWaylandManager->shouldBeFloated(PWINDOW);
- const auto WRULES = g_pConfigManager->getMatchingRules(PWINDOW);
- for (auto& r : WRULES) {
- if (r.szRule == "float") {
- willFloat = true;
- break;
- } else if (r.szRule == "tile") {
- willFloat = false;
- break;
- }
- }
-
- if (willFloat)
- return;
-
- g_pXWaylandManager->setWindowSize(PWINDOW, g_pCompositor->m_pLastMonitor ? g_pCompositor->m_pLastMonitor->vecSize : Vector2D{1920, 1080}, true);
-
- return;
- }
-
- if (PWINDOW->isHidden())
+ if (!PWINDOW->m_bIsMapped || PWINDOW->isHidden())
return;
if (PWINDOW->m_bIsX11)