layer: allow focus on top/overlay surfaces without a window

This commit is contained in:
vaxerski 2023-03-28 17:21:06 +01:00
parent 6fec5bfbeb
commit df54ab40ce
1 changed files with 2 additions and 1 deletions

View File

@ -360,7 +360,8 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
unsetCursorImage();
}
if (pFoundLayerSurface && pFoundLayerSurface->layerSurface->current.keyboard_interactive && *PFOLLOWMOUSE != 3 && allowKeyboardRefocus) {
if (pFoundLayerSurface && (pFoundLayerSurface->layerSurface->current.keyboard_interactive || pFoundLayerSurface->layer >= ZWLR_LAYER_SHELL_V1_LAYER_TOP) &&
*PFOLLOWMOUSE != 3 && allowKeyboardRefocus) {
g_pCompositor->focusSurface(foundSurface);
}