mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-12-14 12:09:36 +00:00
Refactor some dialog handling, enforce proper port disposal
This commit is contained in:
@@ -2,6 +2,7 @@
|
||||
|
||||
#include "IconLoader.h"
|
||||
#include "QDPixMap.h"
|
||||
#include "PLTimeTaggedVOSEvent.h"
|
||||
|
||||
#include <assert.h>
|
||||
|
||||
@@ -46,4 +47,12 @@ namespace PortabilityLayer
|
||||
CopyMask(*m_iconImage, *m_iconMask, *surface->m_port.GetPixMap(), &(*m_iconImage)->m_rect, &(*m_iconMask)->m_rect, &m_rect);
|
||||
surface->m_port.SetDirty(PortabilityLayer::QDPortDirtyFlag_Contents);
|
||||
}
|
||||
|
||||
WidgetHandleState_t IconWidget::ProcessEvent(const TimeTaggedVOSEvent &evt)
|
||||
{
|
||||
if (evt.IsLMouseDownEvent() && m_rect.Contains(m_window->MouseToLocal(evt.m_vosEvent.m_event.m_mouseInputEvent)))
|
||||
return WidgetHandleStates::kActivated;
|
||||
else
|
||||
return WidgetHandleStates::kIgnored;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user