Refactor some dialog handling, enforce proper port disposal

This commit is contained in:
elasota
2020-01-01 20:49:18 -05:00
parent 5fe6218c28
commit 1c6ab800a7
25 changed files with 121 additions and 91 deletions

View File

@@ -10,7 +10,7 @@ namespace PortabilityLayer
{
}
WidgetHandleState_t ButtonWidget::ProcessEvent(Window *window, const TimeTaggedVOSEvent &evt)
WidgetHandleState_t ButtonWidget::ProcessEvent(const TimeTaggedVOSEvent &evt)
{
if (m_haveMouseDown)
{
@@ -18,7 +18,7 @@ namespace PortabilityLayer
{
m_haveMouseDown = false;
const Point pt = window->MouseToLocal(evt.m_vosEvent.m_event.m_mouseInputEvent);
const Point pt = m_window->MouseToLocal(evt.m_vosEvent.m_event.m_mouseInputEvent);
if (m_rect.Contains(pt))
return WidgetHandleStates::kActivated;
else
@@ -31,7 +31,7 @@ namespace PortabilityLayer
{
if (evt.IsLMouseDownEvent())
{
const Point pt = window->MouseToLocal(evt.m_vosEvent.m_event.m_mouseInputEvent);
const Point pt = m_window->MouseToLocal(evt.m_vosEvent.m_event.m_mouseInputEvent);
if (m_rect.Contains(pt))
{