Centralize retained control capture release
This commit is contained in:
@@ -576,6 +576,10 @@ agent or engineer to remove them without reconstructing context from chat.
|
|||||||
through `src/legacy_ui_overlay_services.*` instead of direct `NodeCanvas`
|
through `src/legacy_ui_overlay_services.*` instead of direct `NodeCanvas`
|
||||||
release calls. Capture ownership is still raw until retained `Node` adopts
|
release calls. Capture ownership is still raw until retained `Node` adopts
|
||||||
checked handles and scoped event/capture lifetime.
|
checked handles and scoped event/capture lifetime.
|
||||||
|
- 2026-06-12: DEBT-0063 was narrowed again. Retained button, slider, scroll,
|
||||||
|
color-wheel, color-quad, and canvas gesture-end capture release now route
|
||||||
|
through `src/legacy_ui_overlay_services.*`. The controls still own raw event
|
||||||
|
callback targets and public `Node` capture state.
|
||||||
- 2026-06-05: DEBT-0011 was narrowed. The Windows app package smoke target now
|
- 2026-06-05: DEBT-0011 was narrowed. The Windows app package smoke target now
|
||||||
passes the configure-time CMake executable into `package-smoke.ps1`, so VS
|
passes the configure-time CMake executable into `package-smoke.ps1`, so VS
|
||||||
2026 generator validation does not depend on an older `cmake` on PATH, and
|
2026 generator validation does not depend on an older `cmake` on PATH, and
|
||||||
|
|||||||
@@ -531,6 +531,8 @@ restored floating color-panel title cleanup now use the retained detach/close/
|
|||||||
destroy helpers.
|
destroy helpers.
|
||||||
Canvas mode mouse-capture release for camera, paint, line, grid, mask, and fill
|
Canvas mode mouse-capture release for camera, paint, line, grid, mask, and fill
|
||||||
interactions now routes through the retained capture-release helper.
|
interactions now routes through the retained capture-release helper.
|
||||||
|
Button, slider, scroll, color-wheel, color-quad, and canvas gesture-end capture
|
||||||
|
release now route through that same helper.
|
||||||
Raw popup callback captures and full close/capture ownership remain part of
|
Raw popup callback captures and full close/capture ownership remain part of
|
||||||
`DEBT-0063`.
|
`DEBT-0063`.
|
||||||
`pano_cli inspect-image` exposes PNG IHDR metadata as JSON,
|
`pano_cli inspect-image` exposes PNG IHDR metadata as JSON,
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
#include "node_button_custom.h"
|
#include "node_button_custom.h"
|
||||||
|
|
||||||
Node* NodeButtonCustom::clone_instantiate() const
|
Node* NodeButtonCustom::clone_instantiate() const
|
||||||
@@ -69,13 +70,13 @@ kEventResult NodeButtonCustom::handle_event(Event* e)
|
|||||||
m_color = m_active ? color_active : (m_mouse_inside ? color_hover : color_normal);
|
m_color = m_active ? color_active : (m_mouse_inside ? color_hover : color_normal);
|
||||||
else
|
else
|
||||||
m_color = m_active ? color_active : color_normal;
|
m_color = m_active ? color_active : color_normal;
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
if (m_mouse_inside && on_click != nullptr)
|
if (m_mouse_inside && on_click != nullptr)
|
||||||
on_click(this);
|
on_click(this);
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseCancel:
|
case kEventType::MouseCancel:
|
||||||
m_color = m_active ? color_active : color_normal;
|
m_color = m_active ? color_active : color_normal;
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
return kEventResult::Available;
|
return kEventResult::Available;
|
||||||
|
|||||||
@@ -13,6 +13,7 @@
|
|||||||
#include "app.h"
|
#include "app.h"
|
||||||
#include "node_panel_grid.h"
|
#include "node_panel_grid.h"
|
||||||
#include "legacy_ui_gl_dispatch.h"
|
#include "legacy_ui_gl_dispatch.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
#include "legacy_canvas_tool_services.h"
|
#include "legacy_canvas_tool_services.h"
|
||||||
#include "legacy_history_services.h"
|
#include "legacy_history_services.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
@@ -836,7 +837,7 @@ kEventResult NodeCanvas::handle_event(Event* e)
|
|||||||
mode->on_GestureEvent(ge);
|
mode->on_GestureEvent(ge);
|
||||||
break;
|
break;
|
||||||
case kEventType::GestureEnd:
|
case kEventType::GestureEnd:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
for (auto& mode : *m_canvas->m_mode)
|
for (auto& mode : *m_canvas->m_mode)
|
||||||
mode->on_GestureEvent(ge);
|
mode->on_GestureEvent(ge);
|
||||||
break;
|
break;
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
#include "node_color_quad.h"
|
#include "node_color_quad.h"
|
||||||
#include "shader.h"
|
#include "shader.h"
|
||||||
|
|
||||||
@@ -54,7 +55,7 @@ kEventResult NodeColorQuad::handle_event(Event* e)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseUpL:
|
case kEventType::MouseUpL:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
dragging = false;
|
dragging = false;
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseMove:
|
case kEventType::MouseMove:
|
||||||
@@ -69,7 +70,7 @@ kEventResult NodeColorQuad::handle_event(Event* e)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseCancel:
|
case kEventType::MouseCancel:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
dragging = false;
|
dragging = false;
|
||||||
m_value = m_old_value;
|
m_value = m_old_value;
|
||||||
set_value(m_value.x, m_value.y);
|
set_value(m_value.x, m_value.y);
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "legacy_gl_mesh_dispatch.h"
|
#include "legacy_gl_mesh_dispatch.h"
|
||||||
#include "legacy_ui_gl_dispatch.h"
|
#include "legacy_ui_gl_dispatch.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
#include "node_colorwheel.h"
|
#include "node_colorwheel.h"
|
||||||
#include "renderer_gl/opengl_capabilities.h"
|
#include "renderer_gl/opengl_capabilities.h"
|
||||||
#include "shader.h"
|
#include "shader.h"
|
||||||
@@ -180,7 +181,7 @@ kEventResult NodeColorWheel::handle_event(Event* e)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseUpL:
|
case kEventType::MouseUpL:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
dragging = false;
|
dragging = false;
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseMove:
|
case kEventType::MouseMove:
|
||||||
@@ -203,7 +204,7 @@ kEventResult NodeColorWheel::handle_event(Event* e)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseCancel:
|
case kEventType::MouseCancel:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
dragging = false;
|
dragging = false;
|
||||||
m_hsv = m_old_value;
|
m_hsv = m_old_value;
|
||||||
handle_color_change();
|
handle_color_change();
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
#include "legacy_ui_gl_dispatch.h"
|
#include "legacy_ui_gl_dispatch.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
#include "node_scroll.h"
|
#include "node_scroll.h"
|
||||||
#include "event.h"
|
#include "event.h"
|
||||||
#include "shader.h"
|
#include "shader.h"
|
||||||
@@ -184,7 +185,7 @@ kEventResult NodeScroll::handle_event(Event* e)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseUpL:
|
case kEventType::MouseUpL:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
m_dragging = false;
|
m_dragging = false;
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseScroll:
|
case kEventType::MouseScroll:
|
||||||
@@ -200,10 +201,10 @@ kEventResult NodeScroll::handle_event(Event* e)
|
|||||||
fix_scroll();
|
fix_scroll();
|
||||||
break;
|
break;
|
||||||
case kEventType::GestureEnd:
|
case kEventType::GestureEnd:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseCancel:
|
case kEventType::MouseCancel:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
m_dragging = false;
|
m_dragging = false;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
|
|||||||
@@ -1,5 +1,6 @@
|
|||||||
#include "pch.h"
|
#include "pch.h"
|
||||||
#include "log.h"
|
#include "log.h"
|
||||||
|
#include "legacy_ui_overlay_services.h"
|
||||||
#include "node_slider.h"
|
#include "node_slider.h"
|
||||||
#include "shader.h"
|
#include "shader.h"
|
||||||
|
|
||||||
@@ -91,7 +92,7 @@ kEventResult NodeSliderH::handle_event(Event* e)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseUpL:
|
case kEventType::MouseUpL:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
if (dragging && on_value_final)
|
if (dragging && on_value_final)
|
||||||
on_value_final(this, m_value);
|
on_value_final(this, m_value);
|
||||||
dragging = false;
|
dragging = false;
|
||||||
@@ -109,7 +110,7 @@ kEventResult NodeSliderH::handle_event(Event* e)
|
|||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case kEventType::MouseCancel:
|
case kEventType::MouseCancel:
|
||||||
mouse_release();
|
pp::panopainter::release_legacy_mouse_capture(*this);
|
||||||
if (dragging)
|
if (dragging)
|
||||||
{
|
{
|
||||||
m_value = m_old_value;
|
m_value = m_old_value;
|
||||||
|
|||||||
Reference in New Issue
Block a user