diff options
author | vaxerski <[email protected]> | 2022-12-02 20:10:15 +0000 |
---|---|---|
committer | vaxerski <[email protected]> | 2022-12-02 20:10:15 +0000 |
commit | d39d6cc1e39306292ec57a72e4a151d0cb08d13e (patch) | |
tree | 0b6aaf1c07f6efd054b7c25d086b0d2ee0c130f2 | |
parent | d6b3bfc48e22ac502d6159df5f9446df60217fa8 (diff) | |
download | Hyprland-d39d6cc1e39306292ec57a72e4a151d0cb08d13e.tar.gz Hyprland-d39d6cc1e39306292ec57a72e4a151d0cb08d13e.zip |
don't initial focus on LS keyboard grab
-rw-r--r-- | src/events/Windows.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/events/Windows.cpp b/src/events/Windows.cpp index 5683eb45..6f524da2 100644 --- a/src/events/Windows.cpp +++ b/src/events/Windows.cpp @@ -403,6 +403,11 @@ void Events::listener_mapWindow(void* owner, void* data) { PWINDOW->m_bX11ShouldntFocus = false; } + // check LS focus grab + const auto PLSFROMFOCUS = g_pCompositor->getLayerSurfaceFromSurface(g_pCompositor->m_pLastFocus); + if (PLSFROMFOCUS && PLSFROMFOCUS->layerSurface->current.keyboard_interactive) + PWINDOW->m_bNoInitialFocus = true; + if (!PWINDOW->m_bNoFocus && !PWINDOW->m_bNoInitialFocus && PWINDOW->m_iX11Type != 2 && !workspaceSilent) { g_pCompositor->focusWindow(PWINDOW); PWINDOW->m_fActiveInactiveAlpha.setValueAndWarp(*PACTIVEALPHA); |