Merge pull request #21856 from LaurentBerger:I21853

Try to solve I21853 mouse wheel problem with GTK3
pull/21936/head^2
OpenCV Pushbot 3 years ago committed by GitHub
commit 039f3d01a0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      modules/highgui/src/window_gtk.cpp

@ -1831,7 +1831,7 @@ static gboolean icvOnMouse( GtkWidget *widget, GdkEvent *event, gpointer user_da
#if defined(GTK_VERSION3_4) #if defined(GTK_VERSION3_4)
// NOTE: in current implementation doesn't possible to put into callback function delta_x and delta_y separately // NOTE: in current implementation doesn't possible to put into callback function delta_x and delta_y separately
double delta = (event->scroll.delta_x + event->scroll.delta_y); double delta = (event->scroll.delta_x + event->scroll.delta_y);
cv_event = (event->scroll.delta_y!=0) ? CV_EVENT_MOUSEHWHEEL : CV_EVENT_MOUSEWHEEL; cv_event = (event->scroll.delta_x==0) ? CV_EVENT_MOUSEWHEEL : CV_EVENT_MOUSEHWHEEL;
#else #else
cv_event = CV_EVENT_MOUSEWHEEL; cv_event = CV_EVENT_MOUSEWHEEL;
#endif //GTK_VERSION3_4 #endif //GTK_VERSION3_4

Loading…
Cancel
Save