mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-23 02:05:58 +01:00
input: improve mouse release conditions
This commit is contained in:
parent
f914a5a06d
commit
b15803510c
2 changed files with 4 additions and 3 deletions
|
@ -796,8 +796,6 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!pWindow || !windowValidMapped(pWindow)) {
|
if (!pWindow || !windowValidMapped(pWindow)) {
|
||||||
g_pInputManager->releaseAllMouseButtons();
|
|
||||||
|
|
||||||
const auto PLASTWINDOW = m_pLastWindow;
|
const auto PLASTWINDOW = m_pLastWindow;
|
||||||
m_pLastWindow = nullptr;
|
m_pLastWindow = nullptr;
|
||||||
|
|
||||||
|
@ -870,7 +868,6 @@ void CCompositor::focusWindow(CWindow* pWindow, wlr_surface* pSurface) {
|
||||||
|
|
||||||
// do pointer focus too
|
// do pointer focus too
|
||||||
const auto POINTERLOCAL = g_pInputManager->getMouseCoordsInternal() - pWindow->m_vRealPosition.goalv();
|
const auto POINTERLOCAL = g_pInputManager->getMouseCoordsInternal() - pWindow->m_vRealPosition.goalv();
|
||||||
g_pInputManager->releaseAllMouseButtons();
|
|
||||||
wlr_seat_pointer_notify_enter(m_sSeat.seat, PWINDOWSURFACE, POINTERLOCAL.x, POINTERLOCAL.y);
|
wlr_seat_pointer_notify_enter(m_sSeat.seat, PWINDOWSURFACE, POINTERLOCAL.x, POINTERLOCAL.y);
|
||||||
|
|
||||||
updateWindowAnimatedDecorationValues(pWindow);
|
updateWindowAnimatedDecorationValues(pWindow);
|
||||||
|
|
|
@ -770,6 +770,8 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
|
|
||||||
auto pWorkspaceToChangeTo = g_pCompositor->getWorkspaceByID(PCURRENTWORKSPACE->m_sPrevWorkspace.iID);
|
auto pWorkspaceToChangeTo = g_pCompositor->getWorkspaceByID(PCURRENTWORKSPACE->m_sPrevWorkspace.iID);
|
||||||
|
|
||||||
|
g_pInputManager->releaseAllMouseButtons();
|
||||||
|
|
||||||
if (pWorkspaceToChangeTo) {
|
if (pWorkspaceToChangeTo) {
|
||||||
const auto PMONITORWORKSPACEOWNER = PMONITOR->ID == pWorkspaceToChangeTo->m_iMonitorID ? PMONITOR : g_pCompositor->getMonitorFromID(pWorkspaceToChangeTo->m_iMonitorID);
|
const auto PMONITORWORKSPACEOWNER = PMONITOR->ID == pWorkspaceToChangeTo->m_iMonitorID ? PMONITOR : g_pCompositor->getMonitorFromID(pWorkspaceToChangeTo->m_iMonitorID);
|
||||||
|
|
||||||
|
@ -814,6 +816,8 @@ void CKeybindManager::changeworkspace(std::string args) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
g_pInputManager->releaseAllMouseButtons();
|
||||||
|
|
||||||
const auto PMONITORWORKSPACEOWNER = PMONITOR->ID == pWorkspaceToChangeTo->m_iMonitorID ? PMONITOR : g_pCompositor->getMonitorFromID(pWorkspaceToChangeTo->m_iMonitorID);
|
const auto PMONITORWORKSPACEOWNER = PMONITOR->ID == pWorkspaceToChangeTo->m_iMonitorID ? PMONITOR : g_pCompositor->getMonitorFromID(pWorkspaceToChangeTo->m_iMonitorID);
|
||||||
|
|
||||||
g_pCompositor->setActiveMonitor(PMONITORWORKSPACEOWNER);
|
g_pCompositor->setActiveMonitor(PMONITORWORKSPACEOWNER);
|
||||||
|
|
Loading…
Reference in a new issue