From 4e63bd04e570993ef3d0386a692d9bd6a6920130 Mon Sep 17 00:00:00 2001 From: Alexandr Kondratev Date: Mon, 4 Jul 2016 15:02:05 +0300 Subject: [PATCH] highgui module: mouse wheel - modification keys fixed, wheel event value is CV_EVENT_MOUSEWHEEL or CV_EVENT_MOUSEHWHEEL --- modules/highgui/src/window_gtk.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/highgui/src/window_gtk.cpp b/modules/highgui/src/window_gtk.cpp index bde5487035..475f85f9f6 100644 --- a/modules/highgui/src/window_gtk.cpp +++ b/modules/highgui/src/window_gtk.cpp @@ -1975,22 +1975,22 @@ static gboolean icvOnMouse( GtkWidget *widget, GdkEvent *event, gpointer user_da int orient = CV_EVENT_MOUSEWHEEL; #endif //GTK_VERSION3_4 - cv_event = CV_EVENT_MOUSEWHEEL; state = event->scroll.state; switch(event->scroll.direction) { #if defined(GTK_VERSION3_4) - case GDK_SCROLL_SMOOTH: flags |= (((int)delta << 16) | orient); + case GDK_SCROLL_SMOOTH: flags |= (((int)delta << 16)); break; #endif //GTK_VERSION3_4 case GDK_SCROLL_LEFT: orient = CV_EVENT_MOUSEHWHEEL; - case GDK_SCROLL_UP: flags |= ((-(int)1 << 16) | orient); + case GDK_SCROLL_UP: flags |= ((-(int)1 << 16)); break; case GDK_SCROLL_RIGHT: orient = CV_EVENT_MOUSEHWHEEL; - case GDK_SCROLL_DOWN: flags |= (((int)1 << 16) | orient); + case GDK_SCROLL_DOWN: flags |= (((int)1 << 16)); break; default: ; }; + cv_event = orient; } if( cv_event >= 0 )