mirror of
https://github.com/hyprwm/Hyprland.git
synced 2024-12-26 09:15:16 +03:00
keybinds: fix mouse pass (#6652)
* keybinds: fix mouse pass * keybinds: keep mouse and keyboard focus separate after pass bind
This commit is contained in:
parent
eef207ce0a
commit
784c0b5ccb
@ -2026,7 +2026,8 @@ void CKeybindManager::pass(std::string regexp) {
|
||||
}
|
||||
|
||||
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 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) {
|
||||
|
Loading…
Reference in New Issue
Block a user