diff options
| author | Vaxry <43317083+vaxerski@users.noreply.github.com> | 2024-04-27 12:43:12 +0100 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-27 12:43:12 +0100 |
| commit | bca7804bb6e1bf5ce5a99b9ae4806be25e36993c (patch) | |
| tree | ebd3a578de1dfe11b54f9440cfc3a408ffa6a620 /src/events/Layers.cpp | |
| parent | 25aec3ac8ce65ed224f025f8f6dfef73780577a4 (diff) | |
internal: Window storage rework - part 1 (#5762)
* Window storage rework - part 1
* format
* remove useless include
* fix pch
* format
* fix crash in dwindle
* fix vram leak
* prefer .expired() for bool checks
Diffstat (limited to 'src/events/Layers.cpp')
| -rw-r--r-- | src/events/Layers.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/events/Layers.cpp b/src/events/Layers.cpp index ab002ef6..1877822a 100644 --- a/src/events/Layers.cpp +++ b/src/events/Layers.cpp @@ -237,9 +237,9 @@ void Events::listener_unmapLayerSurface(void* owner, void* data) { foundSurface = g_pCompositor->vectorToLayerSurface(g_pInputManager->getMouseCoordsInternal(), &PMONITOR->m_aLayerSurfaceLayers[ZWLR_LAYER_SHELL_V1_LAYER_TOP], &surfaceCoords, &pFoundLayerSurface); - if (!foundSurface && g_pCompositor->m_pLastWindow && g_pCompositor->isWorkspaceVisible(g_pCompositor->m_pLastWindow->m_pWorkspace)) { + if (!foundSurface && g_pCompositor->m_pLastWindow.lock() && g_pCompositor->isWorkspaceVisible(g_pCompositor->m_pLastWindow.lock()->m_pWorkspace)) { // if there isn't any, focus the last window - const auto PLASTWINDOW = g_pCompositor->m_pLastWindow; + const auto PLASTWINDOW = g_pCompositor->m_pLastWindow.lock(); g_pCompositor->focusWindow(nullptr); g_pCompositor->focusWindow(PLASTWINDOW); } else { |
