From 9e88518eb22a9b941c2a39f4ff0c5c570c98f59c Mon Sep 17 00:00:00 2001 From: Stefan Csomor Date: Mon, 25 Sep 2017 17:40:36 +0200 Subject: [PATCH] Emulating proper Left Down State for Mouse Events on iPhone --- src/osx/iphone/window.mm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/osx/iphone/window.mm b/src/osx/iphone/window.mm index e6e208b318..d29beb7035 100644 --- a/src/osx/iphone/window.mm +++ b/src/osx/iphone/window.mm @@ -150,7 +150,8 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSSet* touches, UIEvent * nsEvent switch ( button ) { case 0 : - wxevent.SetEventType( clickCount > 1 ? wxEVT_LEFT_DCLICK : wxEVT_LEFT_DOWN ) ; + wxevent.SetEventType( clickCount > 1 ? wxEVT_LEFT_DCLICK : wxEVT_LEFT_DOWN ); + wxevent.SetLeftDown(true); break ; default: @@ -162,7 +163,8 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSSet* touches, UIEvent * nsEvent switch ( button ) { case 0 : - wxevent.SetEventType( wxEVT_LEFT_UP ) ; + wxevent.SetEventType( wxEVT_LEFT_UP ); + wxevent.SetLeftDown(false); break ; default: @@ -171,7 +173,8 @@ void SetupMouseEvent( wxMouseEvent &wxevent , NSSet* touches, UIEvent * nsEvent break ; case UITouchPhaseMoved : - wxevent.SetEventType( wxEVT_MOTION ) ; + wxevent.SetEventType( wxEVT_MOTION ); + wxevent.SetLeftDown(true); break; default : break ;