mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-11-27 04:01:08 +00:00
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: <https://gitlab.freedesktop.org/gstreamer/gst-plugins-good/-/merge_requests/974>
This commit is contained in:
parent
9cd6d02cff
commit
04fdfc4bf1
1 changed files with 2 additions and 12 deletions
|
@ -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);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue