From ca2ab3387f2ba248b2851c4e33195b422b0b4b94 Mon Sep 17 00:00:00 2001 From: LaurentBerger Date: Tue, 12 Apr 2022 13:48:33 +0200 Subject: [PATCH] Try to solve I21853 mouse wheel problem with GTK3 --- modules/highgui/src/window_gtk.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/highgui/src/window_gtk.cpp b/modules/highgui/src/window_gtk.cpp index d8125a67ae..5583ab358b 100644 --- a/modules/highgui/src/window_gtk.cpp +++ b/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) // 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); - 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 cv_event = CV_EVENT_MOUSEWHEEL; #endif //GTK_VERSION3_4