From 04fdfc4bf112ac782a19b279ec4fe1bd7f4e0213 Mon Sep 17 00:00:00 2001 From: Bastien Nocera Date: Wed, 5 May 2021 16:48:10 +0200 Subject: [PATCH] gtk: Remove coordinates double-translation Remove our own translation in the mouse event capture code, as that translation will be done through the navigation interface. Tested by resizing the window created by: gst-launch-1.0 -v videotestsrc ! navigationtest ! glupload ! glcolorconvert ! tee name=t ! gtkglsink and checking that the cursor follows the mouse as expected. Part-of: --- ext/gtk/gtkgstbasewidget.c | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/ext/gtk/gtkgstbasewidget.c b/ext/gtk/gtkgstbasewidget.c index 3ad7903e22..bc9cc02d3f 100644 --- a/ext/gtk/gtkgstbasewidget.c +++ b/ext/gtk/gtkgstbasewidget.c @@ -335,13 +335,8 @@ gtk_gst_base_widget_button_event (GtkWidget * widget, GdkEventButton * event) const gchar *key_type = event->type == GDK_BUTTON_PRESS ? "mouse-button-press" : "mouse-button-release"; - gdouble x, y; - - gtk_gst_base_widget_display_size_to_stream_size (base_widget, event->x, - event->y, &x, &y); - gst_navigation_send_mouse_event (GST_NAVIGATION (element), key_type, - event->button, x, y); + event->button, event->x, event->y); } g_object_unref (element); } @@ -357,13 +352,8 @@ gtk_gst_base_widget_motion_event (GtkWidget * widget, GdkEventMotion * event) if ((element = g_weak_ref_get (&base_widget->element))) { if (GST_IS_NAVIGATION (element)) { - gdouble x, y; - - gtk_gst_base_widget_display_size_to_stream_size (base_widget, event->x, - event->y, &x, &y); - gst_navigation_send_mouse_event (GST_NAVIGATION (element), "mouse-move", - 0, x, y); + 0, event->x, event->y); } g_object_unref (element); }