mirror of
https://github.com/hyprwm/Hyprland.git
synced 2025-08-09 08:31:54 -07:00
internal: release buttons on unmap
This commit is contained in:
@@ -218,6 +218,8 @@ void Events::listener_unmapLayerSurface(void* owner, void* data) {
|
|||||||
|
|
||||||
// refocus if needed
|
// refocus if needed
|
||||||
if (WASLASTFOCUS) {
|
if (WASLASTFOCUS) {
|
||||||
|
g_pInputManager->releaseAllMouseButtons();
|
||||||
|
|
||||||
Vector2D surfaceCoords;
|
Vector2D surfaceCoords;
|
||||||
SLayerSurface* pFoundLayerSurface = nullptr;
|
SLayerSurface* pFoundLayerSurface = nullptr;
|
||||||
wlr_surface* foundSurface = nullptr;
|
wlr_surface* foundSurface = nullptr;
|
||||||
|
@@ -173,6 +173,9 @@ void Events::listener_unmapPopupXDG(void* owner, void* data) {
|
|||||||
|
|
||||||
ASSERT(PPOPUP);
|
ASSERT(PPOPUP);
|
||||||
|
|
||||||
|
if (PPOPUP->popup->base->surface == g_pCompositor->m_pLastFocus)
|
||||||
|
g_pInputManager->releaseAllMouseButtons();
|
||||||
|
|
||||||
SubsurfaceTree::destroySurfaceTree(PPOPUP->pSurfaceTree);
|
SubsurfaceTree::destroySurfaceTree(PPOPUP->pSurfaceTree);
|
||||||
|
|
||||||
int lx = 0, ly = 0;
|
int lx = 0, ly = 0;
|
||||||
|
@@ -637,6 +637,8 @@ void Events::listener_unmapWindow(void* owner, void* data) {
|
|||||||
wasLastWindow = true;
|
wasLastWindow = true;
|
||||||
g_pCompositor->m_pLastWindow = nullptr;
|
g_pCompositor->m_pLastWindow = nullptr;
|
||||||
g_pCompositor->m_pLastFocus = nullptr;
|
g_pCompositor->m_pLastFocus = nullptr;
|
||||||
|
|
||||||
|
g_pInputManager->releaseAllMouseButtons();
|
||||||
}
|
}
|
||||||
|
|
||||||
PWINDOW->m_bMappedX11 = false;
|
PWINDOW->m_bMappedX11 = false;
|
||||||
|
@@ -184,6 +184,9 @@ void Events::listener_unmapSubsurface(void* owner, void* data) {
|
|||||||
|
|
||||||
Debug::log(LOG, "Subsurface %x unmapped", subsurface);
|
Debug::log(LOG, "Subsurface %x unmapped", subsurface);
|
||||||
|
|
||||||
|
if (subsurface->pSubsurface->surface == g_pCompositor->m_pLastFocus)
|
||||||
|
g_pInputManager->releaseAllMouseButtons();
|
||||||
|
|
||||||
if (subsurface->pChild) {
|
if (subsurface->pChild) {
|
||||||
const auto PNODE = subsurface->pChild;
|
const auto PNODE = subsurface->pChild;
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user