From: Bastien Nocera Date: Wed, 5 May 2021 14:48:10 +0000 (+0200) Subject: gtk: Remove coordinates double-translation X-Git-Tag: 1.19.3~509^2~129 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=04fdfc4bf112ac782a19b279ec4fe1bd7f4e0213;p=platform%2Fupstream%2Fgstreamer.git 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: --- diff --git a/ext/gtk/gtkgstbasewidget.c b/ext/gtk/gtkgstbasewidget.c index 3ad7903..bc9cc02 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); }