mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 01:46:00 +01: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
1 changed files with 5 additions and 4 deletions
|
@ -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 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
|
// pass all mf shit
|
||||||
if (!XWTOXW) {
|
if (!XWTOXW) {
|
||||||
|
@ -2078,9 +2079,9 @@ void CKeybindManager::pass(std::string regexp) {
|
||||||
const auto SL = PWINDOW->m_vRealPosition.goal() - g_pInputManager->getMouseCoordsInternal();
|
const auto SL = PWINDOW->m_vRealPosition.goal() - g_pInputManager->getMouseCoordsInternal();
|
||||||
|
|
||||||
if (g_pKeybindManager->m_uLastCode != 0)
|
if (g_pKeybindManager->m_uLastCode != 0)
|
||||||
g_pSeatManager->setKeyboardFocus(LASTSRF);
|
g_pSeatManager->setKeyboardFocus(LASTKBSURF);
|
||||||
else
|
else
|
||||||
g_pSeatManager->setPointerFocus(PWINDOW->m_pWLSurface->resource(), SL);
|
g_pSeatManager->setPointerFocus(LASTMOUSESURF, SL);
|
||||||
}
|
}
|
||||||
|
|
||||||
void CKeybindManager::sendshortcut(std::string args) {
|
void CKeybindManager::sendshortcut(std::string args) {
|
||||||
|
|
Loading…
Reference in a new issue