Mikhail Grushinskiy
Mikhail Grushinskiy
Ok. I'm now able to add touch event listeners and receive them in OpenCPN. Now the issue is how to make it work with fewer code changes. I tried to...
I've put in chcanv.cpp into constructor ``` printf("%s\n", "registering events"); if ( !EnableTouchEvents( wxTOUCH_PRESS_GESTURES ) ) { printf("%s\n", "failed to enable touch events"); // Still bind event handlers just in...
Ok with this in chcanv.cpp into constructor (and obvious include file additions) ``` printf("%s\n", "registering events"); if ( !EnableTouchEvents( wxTOUCH_PRESS_GESTURES | wxTOUCH_ZOOM_GESTURE ) ) { printf("%s\n", "failed to enable touch...
GTK3 has a bug with touch menus. I have to rollback to using GTK2 See https://gitlab.gnome.org/GNOME/gtk/-/issues/945 and merge request https://gitlab.gnome.org/GNOME/gtk/-/merge_requests/1794
Going back to GTK2 doesn't help. Touch events do not work at all. Handlers fail to register. So instead I've went with upgrade of GTK3 to the latest tag. Now...
Ok with this in src/chcanv.cpp into constructor (and obvious include file additions) ``` if ( !EnableTouchEvents( wxTOUCH_PRESS_GESTURES | wxTOUCH_ZOOM_GESTURE | wxTOUCH_PAN_GESTURES )) { wxLogError("Failed to enable touch events"); // Still...
OK. Finally. I've found solution on how to do right click emulation with long touch using external separate program. So in previous patch replace EnableTouchEvents call with `if ( !EnableTouchEvents(...
Found one more issue. Two finger zoom with OpenGL enabled most of the time is recognized as pan instead of zoom. Weird...
Hmm. Somehow with openGL enabled zoom action requires 3 fingers. 2 fingers do pan.
With this and OpenGL enabled it looks better. However zoom requires 3 fingers. ``` void ChartCanvas::OnPan(wxPanGestureEvent& event) { if ( event.IsGestureEnd() ) { wxEvtHandler *evthp = GetEventHandler(); wxMouseEvent ev( wxEVT_MOTION...