summaryrefslogtreecommitdiff
path: root/src/managers/KeybindManager.cpp
diff options
context:
space:
mode:
authorGregory <56975502+Trimutex@users.noreply.github.com>2024-06-25 06:46:49 -0500
committerGitHub <noreply@github.com>2024-06-25 13:46:49 +0200
commit784c0b5ccb9b99bde66bd45bb94af5f195980f2e (patch)
tree5874c658acbbbfbcf58a059266b7944751229b49 /src/managers/KeybindManager.cpp
parenteef207ce0a46c13dafa8fab3a462e62c8a3c04f1 (diff)
keybinds: fix mouse pass (#6652)
* keybinds: fix mouse pass * keybinds: keep mouse and keyboard focus separate after pass bind
Diffstat (limited to 'src/managers/KeybindManager.cpp')
-rw-r--r--src/managers/KeybindManager.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/managers/KeybindManager.cpp b/src/managers/KeybindManager.cpp
index 37159ca8..c5a35012 100644
--- a/src/managers/KeybindManager.cpp
+++ b/src/managers/KeybindManager.cpp
@@ -2025,8 +2025,9 @@ void CKeybindManager::pass(std::string regexp) {
return;
}
- const auto XWTOXW = PWINDOW->m_bIsX11 && g_pCompositor->m_pLastWindow.lock() && g_pCompositor->m_pLastWindow->m_bIsX11;
- const auto LASTSRF = g_pCompositor->m_pLastFocus.lock();
+ const auto XWTOXW = PWINDOW->m_bIsX11 && g_pCompositor->m_pLastWindow.lock() && g_pCompositor->m_pLastWindow->m_bIsX11;
+ const auto LASTMOUSESURF = g_pSeatManager->state.pointerFocus.lock();
+ const auto LASTKBSURF = g_pSeatManager->state.keyboardFocus.lock();
// pass all mf shit
if (!XWTOXW) {
@@ -2078,9 +2079,9 @@ void CKeybindManager::pass(std::string regexp) {
const auto SL = PWINDOW->m_vRealPosition.goal() - g_pInputManager->getMouseCoordsInternal();
if (g_pKeybindManager->m_uLastCode != 0)
- g_pSeatManager->setKeyboardFocus(LASTSRF);
+ g_pSeatManager->setKeyboardFocus(LASTKBSURF);
else
- g_pSeatManager->setPointerFocus(PWINDOW->m_pWLSurface->resource(), SL);
+ g_pSeatManager->setPointerFocus(LASTMOUSESURF, SL);
}
void CKeybindManager::sendshortcut(std::string args) {