mirror of
https://github.com/hyprwm/Hyprland
synced 2024-11-27 02:06:00 +01:00
guard drag in destroyDrag
This commit is contained in:
parent
0d95a0174c
commit
bacfae3084
1 changed files with 2 additions and 1 deletions
|
@ -124,7 +124,8 @@ void Events::listener_startDrag(wl_listener* listener, void* data) {
|
||||||
void Events::listener_destroyDrag(void* owner, void* data) {
|
void Events::listener_destroyDrag(void* owner, void* data) {
|
||||||
Debug::log(LOG, "Drag destroyed.");
|
Debug::log(LOG, "Drag destroyed.");
|
||||||
|
|
||||||
g_pHyprRenderer->damageBox(g_pInputManager->m_sDrag.pos.x - 2, g_pInputManager->m_sDrag.pos.y - 2, g_pInputManager->m_sDrag.dragIcon->surface->current.width + 4, g_pInputManager->m_sDrag.dragIcon->surface->current.height + 4);
|
if (g_pInputManager->m_sDrag.drag && g_pInputManager->m_sDrag.dragIcon && g_pInputManager->m_sDrag.dragIcon->surface)
|
||||||
|
g_pHyprRenderer->damageBox(g_pInputManager->m_sDrag.pos.x - 2, g_pInputManager->m_sDrag.pos.y - 2, g_pInputManager->m_sDrag.dragIcon->surface->current.width + 4, g_pInputManager->m_sDrag.dragIcon->surface->current.height + 4);
|
||||||
|
|
||||||
g_pInputManager->m_sDrag.drag = nullptr;
|
g_pInputManager->m_sDrag.drag = nullptr;
|
||||||
g_pInputManager->m_sDrag.dragIcon = nullptr;
|
g_pInputManager->m_sDrag.dragIcon = nullptr;
|
||||||
|
|
Loading…
Reference in a new issue