mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-09 16:05:58 +01:00
input: simulate movement only if mouse is over in open/close window
fixes #3726
This commit is contained in:
parent
f10996b575
commit
ba9e7814b0
1 changed files with 4 additions and 2 deletions
|
@ -649,6 +649,7 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
|||
g_pCompositor->setPreferredScaleForSurface(PWINDOW->m_pWLSurface.wlr(), PMONITOR->scale);
|
||||
g_pCompositor->setPreferredTransformForSurface(PWINDOW->m_pWLSurface.wlr(), PMONITOR->transform);
|
||||
|
||||
if (g_pCompositor->vectorToWindowIdeal(g_pInputManager->getMouseCoordsInternal()) == g_pCompositor->m_pLastWindow)
|
||||
g_pInputManager->simulateMouseMovement();
|
||||
}
|
||||
|
||||
|
@ -740,6 +741,7 @@ void Events::listener_unmapWindow(void* owner, void* data) {
|
|||
if (PWINDOWCANDIDATE != g_pCompositor->m_pLastWindow && PWINDOWCANDIDATE)
|
||||
g_pCompositor->focusWindow(PWINDOWCANDIDATE);
|
||||
|
||||
if (g_pCompositor->vectorToWindowIdeal(g_pInputManager->getMouseCoordsInternal()) == PWINDOWCANDIDATE)
|
||||
g_pInputManager->simulateMouseMovement();
|
||||
|
||||
// CWindow::onUnmap will remove this window's active status, but we can't really do it above.
|
||||
|
|
Loading…
Reference in a new issue