mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-07 15:45:59 +01:00
unset cursor image on end drag if it gets destroyed
This commit is contained in:
parent
80f58bc93f
commit
0c1bec023f
2 changed files with 6 additions and 4 deletions
|
@ -90,6 +90,7 @@ message(STATUS "Setting link libraries")
|
||||||
target_link_libraries(Hyprland PkgConfig::deps)
|
target_link_libraries(Hyprland PkgConfig::deps)
|
||||||
|
|
||||||
target_link_libraries(Hyprland
|
target_link_libraries(Hyprland
|
||||||
|
asan
|
||||||
${CMAKE_SOURCE_DIR}/subprojects/wlroots/build/libwlroots.so.12032 # wlroots is provided by us
|
${CMAKE_SOURCE_DIR}/subprojects/wlroots/build/libwlroots.so.12032 # wlroots is provided by us
|
||||||
pixman-1
|
pixman-1
|
||||||
OpenGL
|
OpenGL
|
||||||
|
@ -103,7 +104,7 @@ target_link_libraries(Hyprland
|
||||||
IF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
|
IF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||||
message(STATUS "Setting debug flags")
|
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_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")
|
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)
|
ENDIF(CMAKE_BUILD_TYPE MATCHES Debug OR CMAKE_BUILD_TYPE MATCHES DEBUG)
|
||||||
|
|
|
@ -180,11 +180,11 @@ void IHyprLayout::onBeginDragWindow() {
|
||||||
void IHyprLayout::onEndDragWindow() {
|
void IHyprLayout::onEndDragWindow() {
|
||||||
const auto DRAGGINGWINDOW = g_pInputManager->currentlyDraggedWindow;
|
const auto DRAGGINGWINDOW = g_pInputManager->currentlyDraggedWindow;
|
||||||
|
|
||||||
|
g_pInputManager->unsetCursorImage();
|
||||||
|
|
||||||
if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW))
|
if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW))
|
||||||
return;
|
return;
|
||||||
|
|
||||||
g_pInputManager->unsetCursorImage();
|
|
||||||
|
|
||||||
if (DRAGGINGWINDOW->m_bDraggingTiled) {
|
if (DRAGGINGWINDOW->m_bDraggingTiled) {
|
||||||
DRAGGINGWINDOW->m_bIsFloating = false;
|
DRAGGINGWINDOW->m_bIsFloating = false;
|
||||||
g_pInputManager->refocus();
|
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.
|
// Window invalid or drag begin size 0,0 meaning we rejected it.
|
||||||
if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW) || m_vBeginDragSizeXY == Vector2D()) {
|
if (!g_pCompositor->windowValidMapped(DRAGGINGWINDOW) || m_vBeginDragSizeXY == Vector2D()) {
|
||||||
|
onEndDragWindow();
|
||||||
g_pInputManager->currentlyDraggedWindow = nullptr;
|
g_pInputManager->currentlyDraggedWindow = nullptr;
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue