diff options
| author | Vaxry <vaxry@vaxry.net> | 2024-05-02 02:17:55 +0100 |
|---|---|---|
| committer | Vaxry <vaxry@vaxry.net> | 2024-05-02 02:18:01 +0100 |
| commit | 56de72f357222beca94e3d4f8152e2523a22c0b3 (patch) | |
| tree | 8de75f4a2e2148bc67312e1d00ce6cd5b13c34d6 /src/events/Windows.cpp | |
| parent | 02bfb2857ee0562bc95cd1f604570967250aa129 (diff) | |
internal: store matched windowrules and emit event
new event for plugins, windowUpdateRules
Diffstat (limited to 'src/events/Windows.cpp')
| -rw-r--r-- | src/events/Windows.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index b408a8b0..dfc694c0 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -144,8 +144,8 @@ void Events::listener_mapWindow(void* owner, void* data) { } // window rules - const auto WINDOWRULES = g_pConfigManager->getMatchingRules(PWINDOW, false); - bool requestsFullscreen = PWINDOW->m_bWantsInitialFullscreen || + PWINDOW->m_vMatchedRules = g_pConfigManager->getMatchingRules(PWINDOW, false); + bool requestsFullscreen = PWINDOW->m_bWantsInitialFullscreen || (!PWINDOW->m_bIsX11 && PWINDOW->m_uSurface.xdg->role == WLR_XDG_SURFACE_ROLE_TOPLEVEL && PWINDOW->m_uSurface.xdg->toplevel->requested.fullscreen) || (PWINDOW->m_bIsX11 && PWINDOW->m_uSurface.xwayland->fullscreen); bool requestsFakeFullscreen = false; @@ -153,7 +153,7 @@ void Events::listener_mapWindow(void* owner, void* data) { bool overridingNoFullscreen = false; bool overridingNoMaximize = false; - for (auto& r : WINDOWRULES) { + for (auto& r : PWINDOW->m_vMatchedRules) { if (r.szRule.starts_with("monitor")) { try { const auto MONITORSTR = removeBeginEndSpacesTabs(r.szRule.substr(r.szRule.find(' '))); @@ -343,7 +343,7 @@ void Events::listener_mapWindow(void* owner, void* data) { PWINDOW->m_bCreatedOverFullscreen = true; // size and move rules - for (auto& r : WINDOWRULES) { + for (auto& r : PWINDOW->m_vMatchedRules) { if (r.szRule.starts_with("size")) { try { const auto VALUE = r.szRule.substr(r.szRule.find(' ') + 1); |
