Commit 4e63bd04 authored by Alexandr Kondratev's avatar Alexandr Kondratev

highgui module: mouse wheel - modification keys fixed, wheel event value is…

highgui module: mouse wheel - modification keys fixed, wheel event value is CV_EVENT_MOUSEWHEEL or CV_EVENT_MOUSEHWHEEL
parent 040409aa
...@@ -1975,22 +1975,22 @@ static gboolean icvOnMouse( GtkWidget *widget, GdkEvent *event, gpointer user_da ...@@ -1975,22 +1975,22 @@ static gboolean icvOnMouse( GtkWidget *widget, GdkEvent *event, gpointer user_da
int orient = CV_EVENT_MOUSEWHEEL; int orient = CV_EVENT_MOUSEWHEEL;
#endif //GTK_VERSION3_4 #endif //GTK_VERSION3_4
cv_event = CV_EVENT_MOUSEWHEEL;
state = event->scroll.state; state = event->scroll.state;
switch(event->scroll.direction) { switch(event->scroll.direction) {
#if defined(GTK_VERSION3_4) #if defined(GTK_VERSION3_4)
case GDK_SCROLL_SMOOTH: flags |= (((int)delta << 16) | orient); case GDK_SCROLL_SMOOTH: flags |= (((int)delta << 16));
break; break;
#endif //GTK_VERSION3_4 #endif //GTK_VERSION3_4
case GDK_SCROLL_LEFT: orient = CV_EVENT_MOUSEHWHEEL; 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; break;
case GDK_SCROLL_RIGHT: orient = CV_EVENT_MOUSEHWHEEL; 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; break;
default: ; default: ;
}; };
cv_event = orient;
} }
if( cv_event >= 0 ) if( cv_event >= 0 )
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment