summaryrefslogtreecommitdiff
path: root/src/events/Windows.cpp
diff options
context:
space:
mode:
authorvaxerski <43317083+vaxerski@users.noreply.github.com>2023-10-02 16:27:32 +0100
committervaxerski <43317083+vaxerski@users.noreply.github.com>2023-10-02 16:27:32 +0100
commitb814ba98a7c74e29afe4e5e543ee6d0283a67d67 (patch)
tree42d078b0d26d8300ede2ea3b32492de41f1bc186 /src/events/Windows.cpp
parent50fecf084d06f8b982194fdc9cf53a40741d8453 (diff)
misc: add misc:new_window_takes_over_fullscreen
referenced in #3474
Diffstat (limited to 'src/events/Windows.cpp')
-rw-r--r--src/events/Windows.cpp9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp
index 2ea4e46c..b870f01d 100644
--- a/src/events/Windows.cpp
+++ b/src/events/Windows.cpp
@@ -46,6 +46,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
static auto* const PSWALLOW = &g_pConfigManager->getConfigValuePtr("misc:enable_swallow")->intValue;
static auto* const PSWALLOWREGEX = &g_pConfigManager->getConfigValuePtr("misc:swallow_regex")->strValue;
static auto* const PSWALLOWEXREGEX = &g_pConfigManager->getConfigValuePtr("misc:swallow_exception_regex")->strValue;
+ static auto* const PNEWTAKESOVERFS = &g_pConfigManager->getConfigValuePtr("misc:new_window_takes_over_fullscreen")->intValue;
auto PMONITOR = g_pCompositor->m_pLastMonitor;
const auto PWORKSPACE =
@@ -467,8 +468,12 @@ void Events::listener_mapWindow(void* owner, void* data) {
const auto PLSFROMFOCUS = g_pCompositor->getLayerSurfaceFromSurface(g_pCompositor->m_pLastFocus);
if (PLSFROMFOCUS && PLSFROMFOCUS->layerSurface->current.keyboard_interactive)
PWINDOW->m_bNoInitialFocus = true;
- if (PWORKSPACE->m_bHasFullscreenWindow && !requestsFullscreen)
- PWINDOW->m_bNoInitialFocus = true;
+ if (PWORKSPACE->m_bHasFullscreenWindow && !requestsFullscreen) {
+ if (*PNEWTAKESOVERFS == 0)
+ PWINDOW->m_bNoInitialFocus = true;
+ else
+ requestsFullscreen = true;
+ }
if (!PWINDOW->m_bNoFocus && !PWINDOW->m_bNoInitialFocus &&
(PWINDOW->m_iX11Type != 2 || (PWINDOW->m_bIsX11 && wlr_xwayland_or_surface_wants_focus(PWINDOW->m_uSurface.xwayland))) && !workspaceSilent &&