mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-07 15:41:58 -07:00
minor focus fixes with LS-es and moving windows
This commit is contained in:
@@ -1015,6 +1015,10 @@ void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) {
|
|||||||
// manually post event cuz it got ignored above
|
// manually post event cuz it got ignored above
|
||||||
g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%x,%s", PWINDOW, PWORKSPACE->m_szName.c_str())});
|
g_pEventManager->postEvent(SHyprIPCEvent{"movewindow", getFormat("%x,%s", PWINDOW, PWORKSPACE->m_szName.c_str())});
|
||||||
|
|
||||||
|
// this window is gone. Unfocus if needed
|
||||||
|
if (g_pCompositor->m_pLastWindow == PWINDOW)
|
||||||
|
g_pCompositor->focusWindow(nullptr);
|
||||||
|
|
||||||
g_pInputManager->refocus();
|
g_pInputManager->refocus();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -297,12 +297,16 @@ void CInputManager::mouseMoveUnified(uint32_t time, bool refocus) {
|
|||||||
|
|
||||||
m_bLastFocusOnLS = false;
|
m_bLastFocusOnLS = false;
|
||||||
} else {
|
} else {
|
||||||
|
if (pFoundLayerSurface) {
|
||||||
|
m_bLastFocusOnLS = true;
|
||||||
|
if (pFoundLayerSurface->layer <= ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM) {
|
||||||
|
g_pCompositor->focusWindow(nullptr);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (pFoundLayerSurface && pFoundLayerSurface->layerSurface->current.keyboard_interactive && *PFOLLOWMOUSE != 3 && allowKeyboardRefocus) {
|
if (pFoundLayerSurface && pFoundLayerSurface->layerSurface->current.keyboard_interactive && *PFOLLOWMOUSE != 3 && allowKeyboardRefocus) {
|
||||||
g_pCompositor->focusSurface(foundSurface);
|
g_pCompositor->focusSurface(foundSurface);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (pFoundLayerSurface)
|
|
||||||
m_bLastFocusOnLS = true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y);
|
wlr_seat_pointer_notify_enter(g_pCompositor->m_sSeat.seat, foundSurface, surfaceLocal.x, surfaceLocal.y);
|
||||||
|
Reference in New Issue
Block a user