Centralize retained control capture release

This commit is contained in:
2026-06-12 16:34:48 +02:00
parent bfaea5398e
commit 84373f26e7
8 changed files with 24 additions and 12 deletions

View File

@@ -1,6 +1,7 @@
#include "pch.h"
#include "legacy_gl_mesh_dispatch.h"
#include "legacy_ui_gl_dispatch.h"
#include "legacy_ui_overlay_services.h"
#include "node_colorwheel.h"
#include "renderer_gl/opengl_capabilities.h"
#include "shader.h"
@@ -180,7 +181,7 @@ kEventResult NodeColorWheel::handle_event(Event* e)
}
break;
case kEventType::MouseUpL:
mouse_release();
pp::panopainter::release_legacy_mouse_capture(*this);
dragging = false;
break;
case kEventType::MouseMove:
@@ -203,7 +204,7 @@ kEventResult NodeColorWheel::handle_event(Event* e)
}
break;
case kEventType::MouseCancel:
mouse_release();
pp::panopainter::release_legacy_mouse_capture(*this);
dragging = false;
m_hsv = m_old_value;
handle_color_change();