mirror of
https://github.com/elasota/Aerofoil.git
synced 2025-09-23 23:00:42 +00:00
Fix web crash when dragging or closing popup windows
This commit is contained in:
@@ -181,8 +181,8 @@ namespace PortabilityLayer
|
|||||||
void HideWindow(Window *window) override;
|
void HideWindow(Window *window) override;
|
||||||
void FindWindow(const Point &point, Window **outWindow, short *outRegion) const override;
|
void FindWindow(const Point &point, Window **outWindow, short *outRegion) const override;
|
||||||
void DestroyWindow(Window *window) override;
|
void DestroyWindow(Window *window) override;
|
||||||
void DragWindow(Window *window, const Point &startPoint, const Rect &constraintRect) override;
|
void DragWindow(Window *window, const Point &startPoint, const Rect &constraintRect) GP_ASYNCIFY_PARANOID_OVERRIDE;
|
||||||
bool HandleCloseBoxClick(Window *window, const Point &startPoint) override;
|
bool HandleCloseBoxClick(Window *window, const Point &startPoint) GP_ASYNCIFY_PARANOID_OVERRIDE;
|
||||||
void SetWindowTitle(Window *window, const PLPasStr &title) override;
|
void SetWindowTitle(Window *window, const PLPasStr &title) override;
|
||||||
Rect2i GetWindowFullRect(Window *window) const override;
|
Rect2i GetWindowFullRect(Window *window) const override;
|
||||||
bool GetWindowChromeInteractionZone(Window *window, const Vec2i &point, RegionID_t &outRegion) const override;
|
bool GetWindowChromeInteractionZone(Window *window, const Vec2i &point, RegionID_t &outRegion) const override;
|
||||||
@@ -1198,7 +1198,14 @@ namespace PortabilityLayer
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
TimeTaggedVOSEvent evt;
|
TimeTaggedVOSEvent evt;
|
||||||
if (WaitForEvent(&evt, 1))
|
bool haveEvent = false;
|
||||||
|
|
||||||
|
{
|
||||||
|
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||||
|
haveEvent = WaitForEvent(&evt, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (haveEvent)
|
||||||
{
|
{
|
||||||
if (evt.m_vosEvent.m_eventType == GpVOSEventTypes::kMouseInput)
|
if (evt.m_vosEvent.m_eventType == GpVOSEventTypes::kMouseInput)
|
||||||
{
|
{
|
||||||
@@ -1253,7 +1260,14 @@ namespace PortabilityLayer
|
|||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
TimeTaggedVOSEvent evt;
|
TimeTaggedVOSEvent evt;
|
||||||
if (WaitForEvent(&evt, 1))
|
|
||||||
|
bool haveEvent = false;
|
||||||
|
{
|
||||||
|
PL_ASYNCIFY_PARANOID_DISARM_FOR_SCOPE();
|
||||||
|
haveEvent = WaitForEvent(&evt, 1);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (haveEvent)
|
||||||
{
|
{
|
||||||
if (evt.m_vosEvent.m_eventType == GpVOSEventTypes::kMouseInput)
|
if (evt.m_vosEvent.m_eventType == GpVOSEventTypes::kMouseInput)
|
||||||
{
|
{
|
||||||
@@ -1693,6 +1707,16 @@ namespace PortabilityLayer
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if GP_ASYNCIFY_PARANOID
|
#if GP_ASYNCIFY_PARANOID
|
||||||
|
void WindowManager::DragWindow(Window *window, const Point &startPoint, const Rect &constraintRect)
|
||||||
|
{
|
||||||
|
static_cast<WindowManagerImpl*>(this)->DragWindow(window, startPoint, constraintRect);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool WindowManager::HandleCloseBoxClick(Window *window, const Point &startPoint)
|
||||||
|
{
|
||||||
|
return static_cast<WindowManagerImpl*>(this)->HandleCloseBoxClick(window, startPoint);
|
||||||
|
}
|
||||||
|
|
||||||
void WindowManager::FlickerWindowIn(Window *window, int32_t velocity)
|
void WindowManager::FlickerWindowIn(Window *window, int32_t velocity)
|
||||||
{
|
{
|
||||||
static_cast<WindowManagerImpl*>(this)->FlickerWindowIn(window, velocity);
|
static_cast<WindowManagerImpl*>(this)->FlickerWindowIn(window, velocity);
|
||||||
|
@@ -33,8 +33,8 @@ namespace PortabilityLayer
|
|||||||
virtual void HideWindow(Window *window) = 0;
|
virtual void HideWindow(Window *window) = 0;
|
||||||
virtual void FindWindow(const Point &point, Window **outWindow, short *outRegion) const = 0;
|
virtual void FindWindow(const Point &point, Window **outWindow, short *outRegion) const = 0;
|
||||||
virtual void DestroyWindow(Window *window) = 0;
|
virtual void DestroyWindow(Window *window) = 0;
|
||||||
virtual void DragWindow(Window *window, const Point &startPoint, const Rect &constraintRect) = 0;
|
GP_ASYNCIFY_PARANOID_VIRTUAL void DragWindow(Window *window, const Point &startPoint, const Rect &constraintRect) GP_ASYNCIFY_PARANOID_PURE;
|
||||||
virtual bool HandleCloseBoxClick(Window *window, const Point &startPoint) = 0;
|
GP_ASYNCIFY_PARANOID_VIRTUAL bool HandleCloseBoxClick(Window *window, const Point &startPoint) GP_ASYNCIFY_PARANOID_PURE;
|
||||||
virtual void SetWindowTitle(Window *window, const PLPasStr &title) = 0;
|
virtual void SetWindowTitle(Window *window, const PLPasStr &title) = 0;
|
||||||
virtual Rect2i GetWindowFullRect(Window *window) const = 0;
|
virtual Rect2i GetWindowFullRect(Window *window) const = 0;
|
||||||
virtual bool GetWindowChromeInteractionZone(Window *window, const Vec2i &point, RegionID_t &outRegion) const = 0;
|
virtual bool GetWindowChromeInteractionZone(Window *window, const Vec2i &point, RegionID_t &outRegion) const = 0;
|
||||||
|
Reference in New Issue
Block a user