From 36bd2a65e35c0aa5070150e1db773b091a3000d6 Mon Sep 17 00:00:00 2001 From: Alexander Alekhin Date: Thu, 23 Dec 2021 13:06:44 +0000 Subject: [PATCH] highgui(gtk): repair scroll events --- modules/highgui/src/window_gtk.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/modules/highgui/src/window_gtk.cpp b/modules/highgui/src/window_gtk.cpp index 5ce88fb7d9..a2c9505eb1 100644 --- a/modules/highgui/src/window_gtk.cpp +++ b/modules/highgui/src/window_gtk.cpp @@ -1824,6 +1824,10 @@ static gboolean icvOnMouse( GtkWidget *widget, GdkEvent *event, gpointer user_da } else if( event->type == GDK_SCROLL ) { + GdkEventScroll* event_scroll = (GdkEventScroll*)event; + pt32f.x = cvFloor(event_scroll->x); + pt32f.y = cvFloor(event_scroll->y); + #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); -- GitLab