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

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);
}