mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-22 17:05:59 +01:00
fix minor issues with move focus and follow mouse 0
This commit is contained in:
parent
62f4503f07
commit
c3f1dc3f52
2 changed files with 8 additions and 11 deletions
|
@ -945,6 +945,7 @@ void CKeybindManager::moveActiveToWorkspace(std::string args) {
|
||||||
|
|
||||||
void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) {
|
void CKeybindManager::moveActiveToWorkspaceSilent(std::string args) {
|
||||||
// hacky, but works lol
|
// hacky, but works lol
|
||||||
|
// TODO: this sucks
|
||||||
|
|
||||||
CWindow* PWINDOW = nullptr;
|
CWindow* PWINDOW = nullptr;
|
||||||
|
|
||||||
|
@ -1015,11 +1016,11 @@ 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
|
PWINDOW->m_iWorkspaceID = OLDWORKSPACEIDRETURN;
|
||||||
if (g_pCompositor->m_pLastWindow == PWINDOW)
|
const auto PNEXTCANDIDATE = g_pLayoutManager->getCurrentLayout()->getNextWindowCandidate(PWINDOW);
|
||||||
g_pCompositor->focusWindow(nullptr);
|
PWINDOW->m_iWorkspaceID = workspaceToMoveTo;
|
||||||
|
|
||||||
g_pInputManager->refocus();
|
g_pCompositor->focusWindow(PNEXTCANDIDATE);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::moveFocusTo(std::string args) {
|
void CKeybindManager::moveFocusTo(std::string args) {
|
||||||
|
|
|
@ -297,16 +297,12 @@ 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);
|
||||||
|
|
Loading…
Reference in a new issue