diff options
| author | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-12 14:32:23 +0000 |
|---|---|---|
| committer | vaxerski <43317083+vaxerski@users.noreply.github.com> | 2022-12-12 14:32:23 +0000 |
| commit | 0c1bec023fa13df651c39c5febcecb35b5ff277a (patch) | |
| tree | a17e42971e5eb35bac73bc1f4fa868e80a8cd8f3 | |
| parent | 80f58bc93f5812cf236f52ba9315aef54407b28c (diff) | |
unset cursor image on end drag if it gets destroyed
| -rw-r--r-- | CMakeLists.txt | 5 | ||||
| -rw-r--r-- | src/layout/IHyprLayout.cpp | 5 |
2 files changed, 6 insertions, 4 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt index c0fd2e76..b5ee63c5 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -90,7 +90,8 @@ message(STATUS "Setting link libraries") target_link_libraries(Hyprland PkgConfig::deps) target_link_libraries(Hyprland - ${CMAKE_SOURCE_DIR}/subprojects/wlroots/build/libwlroots.so.12032 # wlroots is provided by us + asan + ${CMAKE_SOURCE_DIR}/subprojects/wlroots/build/libwlroots.so.12032 # wlroots is provided by us pixman-1 OpenGL GLESv2 @@ -103,7 +104,7 @@ target_link_libraries(Hyprland IF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) message(STATUS "Setting debug flags") - SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -no-pie -fno-builtin") + SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -pg -no-pie -fno-builtin -fsanitize=address") SET(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -pg -no-pie -fno-builtin") SET(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -pg -no-pie -fno-builtin") ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG) diff --git a/src/layout/IHyprLayout.cpp b/src/layout/IHyprLayout.cpp index 3005c541..8696dc31 100644 --- a/src/layout/IHyprLayout.cpp +++ b/src/layout/IHyprLayout.cpp @@ -180,11 +180,11 @@ void IHyprLayout::onBeginDragWindow() { void IHyprLayout::onEndDragWindow() { const auto DRAGGINGWINDOW = g_pInputManager->currentlyDraggedWindow; + g_pInputManager->unsetCursorImage(); + if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW)) return; - g_pInputManager->unsetCursorImage(); - if (DRAGGINGWINDOW->m_bDraggingTiled) { DRAGGINGWINDOW->m_bIsFloating = false; g_pInputManager->refocus(); @@ -201,6 +201,7 @@ void IHyprLayout::onMouseMove(const Vector2D& mousePos) { // Window invalid or drag begin size 0,0 meaning we rejected it. if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW) || m_vBeginDragSizeXY == Vector2D()) { + onEndDragWindow(); g_pInputManager->currentlyDraggedWindow = nullptr; return; } |
