mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-26 13:45: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,7 +649,8 @@ void Events::listener_mapWindow(void* owner, void* data) {
|
||||||
g_pCompositor->setPreferredScaleForSurface(PWINDOW->m_pWLSurface.wlr(), PMONITOR->scale);
|
g_pCompositor->setPreferredScaleForSurface(PWINDOW->m_pWLSurface.wlr(), PMONITOR->scale);
|
||||||
g_pCompositor->setPreferredTransformForSurface(PWINDOW->m_pWLSurface.wlr(), PMONITOR->transform);
|
g_pCompositor->setPreferredTransformForSurface(PWINDOW->m_pWLSurface.wlr(), PMONITOR->transform);
|
||||||
|
|
||||||
g_pInputManager->simulateMouseMovement();
|
if (g_pCompositor->vectorToWindowIdeal(g_pInputManager->getMouseCoordsInternal()) == g_pCompositor->m_pLastWindow)
|
||||||
|
g_pInputManager->simulateMouseMovement();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Events::listener_unmapWindow(void* owner, void* data) {
|
void Events::listener_unmapWindow(void* owner, void* data) {
|
||||||
|
@ -740,7 +741,8 @@ void Events::listener_unmapWindow(void* owner, void* data) {
|
||||||
if (PWINDOWCANDIDATE != g_pCompositor->m_pLastWindow && PWINDOWCANDIDATE)
|
if (PWINDOWCANDIDATE != g_pCompositor->m_pLastWindow && PWINDOWCANDIDATE)
|
||||||
g_pCompositor->focusWindow(PWINDOWCANDIDATE);
|
g_pCompositor->focusWindow(PWINDOWCANDIDATE);
|
||||||
|
|
||||||
g_pInputManager->simulateMouseMovement();
|
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.
|
// CWindow::onUnmap will remove this window's active status, but we can't really do it above.
|
||||||
if (PWINDOW == g_pCompositor->m_pLastWindow || !g_pCompositor->m_pLastWindow) {
|
if (PWINDOW == g_pCompositor->m_pLastWindow || !g_pCompositor->m_pLastWindow) {
|
||||||
|
|
Loading…
Reference in a new issue