OpenSceneGraph Forum Forum Index OpenSceneGraph Forum
Official forum which mirrors the existent OSG mailing lists. Messages posted here are forwarded to the mailing list and vice versa.
 
   FAQFAQ    SearchSearch    MemberlistMemberlist    RulesRules    UsergroupsUsergroups    RegisterRegister 
 Mail2Forum SettingsMail2Forum Settings  ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 
   AlbumAlbum  OpenSceneGraph IRC ChatOpenSceneGraph IRC Chat   SmartFeedSmartFeed 

Win32 touch events fix


 
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission
View previous topic :: View next topic  
Author Message
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11245

PostPosted: Mon Aug 07, 2017 10:43 am    Post subject:
Win32 touch events fix
Reply with quote

Hi Anna,


I'm just doing a review of your changes and am curious how the order change affects the behvaior. What happens before and after these changes? 

It seems like if the dwFlags can have TOUCHEVENTF_UP and TOUCHEVENTF_MOVE at the same time changing the order will just ensure that move events get handled correctly, but will mean that up would be missed.


I'm now a Windows developer and haven't worked with touch under Windows so can't provide much specific guidance, so I'm just trying to sort out why the changes are required and how they might effect things down the line - I don't want to have one usage case fixed but another broken by merging this change.

Thanks,
Robert.





On 27 June 2017 at 02:31, Anna Sokol < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,


I made a slight adjustment by keeping the "else if" but by switching the order of "move" and "up" touch events.

Anna Sokol


On Mon, Jun 26, 2017 at 7:01 PM, Anna Sokol < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:

Hi Robert,


This is a fix for win32 touch events.

The issue is that a TOUCHEVENTTF_MOVE and a TOUCHEVENTTF_UP can occur on the same input. In the original code there was an "else if" checking first for "move" and then for "up". Since both can occur at the same time the "up" was being ignored. In the attached GraphicsWindowWin32.cpp file the "else if" is changed to an "if" check instead so that both the "move" and "up" touch events are registered.  


Anna Sokol













_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Anna Sokol
Guest





PostPosted: Mon Aug 07, 2017 9:06 pm    Post subject:
Win32 touch events fix
Reply with quote

Robert,


In the attached GraphicsWindowWin32.cpp file, I changed order of the "else-if" for the TOUCHEVENTF_UP and TOUCHEVENTF_MOVE, I made it less intrusive then changing them into "if" events. I tested this on Windows 7 64-bit with a touch screen and a Windows 10 64-bit tablet.


Separately in the same file, I also needed to address the fact that the close button would not react on touch so I added to the top of the "handleNativeWindowingEvent" close button handling in case of touch events. Again this was tested on the same 2 devices.


Regards,

Anna Sokol




On Mon, Aug 7, 2017 at 6:42 AM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Anna,


I'm just doing a review of your changes and am curious how the order change affects the behvaior. What happens before and after these changes? 

It seems like if the dwFlags can have TOUCHEVENTF_UP and TOUCHEVENTF_MOVE at the same time changing the order will just ensure that move events get handled correctly, but will mean that up would be missed.


I'm now a Windows developer and haven't worked with touch under Windows so can't provide much specific guidance, so I'm just trying to sort out why the changes are required and how they might effect things down the line - I don't want to have one usage case fixed but another broken by merging this change.

Thanks,
Robert.





On 27 June 2017 at 02:31, Anna Sokol < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,


I made a slight adjustment by keeping the "else if" but by switching the order of "move" and "up" touch events.

Anna Sokol


On Mon, Jun 26, 2017 at 7:01 PM, Anna Sokol < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:

Hi Robert,


This is a fix for win32 touch events.

The issue is that a TOUCHEVENTTF_MOVE and a TOUCHEVENTTF_UP can occur on the same input. In the original code there was an "else if" checking first for "move" and then for "up". Since both can occur at the same time the "up" was being ignored. In the attached GraphicsWindowWin32.cpp file the "else if" is changed to an "if" check instead so that both the "move" and "up" touch events are registered.  


Anna Sokol













_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org





_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
robertosfield
OSG Project Lead


Joined: 18 Mar 2009
Posts: 11245

PostPosted: Tue Aug 08, 2017 12:37 pm    Post subject:
Win32 touch events fix
Reply with quote

Thanks Anna, changes now merged and checked into OSG master.  Cheers, Robert.


On 7 August 2017 at 22:05, Anna Sokol < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Robert,


In the attached GraphicsWindowWin32.cpp file, I changed order of the "else-if" for the TOUCHEVENTF_UP and TOUCHEVENTF_MOVE, I made it less intrusive then changing them into "if" events. I tested this on Windows 7 64-bit with a touch screen and a Windows 10 64-bit tablet.


Separately in the same file, I also needed to address the fact that the close button would not react on touch so I added to the top of the "handleNativeWindowingEvent" close button handling in case of touch events. Again this was tested on the same 2 devices.


Regards,

Anna Sokol




On Mon, Aug 7, 2017 at 6:42 AM, Robert Osfield < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Anna,


I'm just doing a review of your changes and am curious how the order change affects the behvaior. What happens before and after these changes? 

It seems like if the dwFlags can have TOUCHEVENTF_UP and TOUCHEVENTF_MOVE at the same time changing the order will just ensure that move events get handled correctly, but will mean that up would be missed.


I'm now a Windows developer and haven't worked with touch under Windows so can't provide much specific guidance, so I'm just trying to sort out why the changes are required and how they might effect things down the line - I don't want to have one usage case fixed but another broken by merging this change.

Thanks,
Robert.





On 27 June 2017 at 02:31, Anna Sokol < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:
Hi Robert,


I made a slight adjustment by keeping the "else if" but by switching the order of "move" and "up" touch events.

Anna Sokol


On Mon, Jun 26, 2017 at 7:01 PM, Anna Sokol < (
Only registered users can see emails on this board!
Get registred or enter the forums!
)> wrote:
Quote:

Hi Robert,


This is a fix for win32 touch events.

The issue is that a TOUCHEVENTTF_MOVE and a TOUCHEVENTTF_UP can occur on the same input. In the original code there was an "else if" checking first for "move" and then for "up". Since both can occur at the same time the "up" was being ignored. In the attached GraphicsWindowWin32.cpp file the "else if" is changed to an "if" check instead so that both the "move" and "up" touch events are registered.  


Anna Sokol













_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org





_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org








_______________________________________________
osg-submissions mailing list
(
Only registered users can see emails on this board!
Get registred or enter the forums!
)
http://lists.openscenegraph.org/listinfo.cgi/osg-submissions-openscenegraph.org



------------------
Post generated by Mail2Forum
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    OpenSceneGraph Forum Forum Index -> Submission All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum

Similar Topics
Topic Author Forum Replies Posted
No new posts Early events handling Riccardo Corsi General 1 Mon Feb 13, 2017 3:04 pm View latest post
No new posts win32 event handling kwlee07 General 0 Thu Feb 02, 2017 4:29 pm View latest post
No new posts Touch input on Windows Riccardo Corsi Submission 2 Mon Jul 11, 2016 8:39 am View latest post
No new posts Multi touch with WPF tnassour General 0 Mon Jun 27, 2016 2:06 pm View latest post
No new posts Bug touch point in win32 robertosfield General 0 Tue May 31, 2016 10:13 am View latest post


Board Security Anti Bot Question MOD - phpBB MOD against Spam Bots
Powered by phpBB © 2001, 2005 phpBB Group
Protected by Anti-Spam ACP