Skip to content

Commit

Permalink
layerSurface: fix mouse buttons being released on press when exclusive
Browse files Browse the repository at this point in the history
  • Loading branch information
outfoxxed committed Jun 10, 2024
1 parent ff63262 commit 7347996
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/desktop/LayerSurface.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,8 @@ void CLayerSurface::onCommit() {
// if the surface was focused and interactive but now isn't, refocus
if (WASLASTFOCUS && !layerSurface->current.interactivity)
g_pInputManager->refocusLastWindow(g_pCompositor->getMonitorFromID(monitorID));
else if (!WASLASTFOCUS && (ISEXCLUSIVE || (layerSurface->current.interactivity && (g_pSeatManager->mouse.expired() || !g_pInputManager->isConstrained())))) {
else if (!WASEXCLUSIVE && !WASLASTFOCUS &&
(ISEXCLUSIVE || (layerSurface->current.interactivity && (g_pSeatManager->mouse.expired() || !g_pInputManager->isConstrained())))) {
// if not focused last and exclusive or accepting input + unconstrained
g_pSeatManager->setGrab(nullptr);
g_pInputManager->releaseAllMouseButtons();
Expand Down

0 comments on commit 7347996

Please sign in to comment.