From: Matthias Clasen Date: Tue, 31 Oct 2017 20:51:12 +0000 (-0400) Subject: dnd: Remove remnants of screen tracking X-Git-Tag: archive/raspbian/4.4.1+ds1-2+rpi1^2~18^2~23^2~1002 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=85e209a9c37aaecc0d44b85f3512d4214bbae305;p=gtk4.git dnd: Remove remnants of screen tracking There is only one screen nowadays, no need to track it. --- diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 0b10b8c737..606926ee94 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -108,7 +108,6 @@ struct _GtkDragSourceInfo gint start_x, start_y; /* Initial position */ gint cur_x, cur_y; /* Current Position */ - GdkScreen *cur_screen; /* Current screen for pointer */ guint32 grab_time; /* timestamp for initial grab */ GList *selections; /* selections we've claimed */ @@ -222,7 +221,6 @@ static void gtk_drag_context_dnd_finished_cb (GdkDragContext *context, static void gtk_drag_add_update_idle (GtkDragSourceInfo *info); static void gtk_drag_update (GtkDragSourceInfo *info, - GdkScreen *screen, gint x_root, gint y_root, const GdkEvent *event); @@ -1347,8 +1345,6 @@ gtk_drag_begin_internal (GtkWidget *widget, info->icon_widget = NULL; info->destroy_icon = FALSE; - info->cur_screen = gdk_display_get_default_screen (gdk_event_get_display (event)); - info->start_x = start_x; info->start_y = start_y; @@ -1395,7 +1391,7 @@ gtk_drag_begin_internal (GtkWidget *widget, if (event && gdk_event_get_event_type (event) == GDK_MOTION_NOTIFY) gtk_drag_motion_cb (info->ipc_widget, (GdkEventMotion *)event, info); else - gtk_drag_update (info, info->cur_screen, info->cur_x, info->cur_y, event); + gtk_drag_update (info, info->cur_x, info->cur_y, event); g_signal_connect (info->ipc_widget, "grab-notify", G_CALLBACK (gtk_drag_grab_notify_cb), info); @@ -2124,7 +2120,6 @@ gtk_drag_add_update_idle (GtkDragSourceInfo *info) /* * gtk_drag_update: * @info: DragSourceInfo for the drag - * @screen: new screen * @x_root: new X position * @y_root: new y position * @event: event received requiring update @@ -2134,12 +2129,10 @@ gtk_drag_add_update_idle (GtkDragSourceInfo *info) */ static void gtk_drag_update (GtkDragSourceInfo *info, - GdkScreen *screen, gint x_root, gint y_root, const GdkEvent *event) { - info->cur_screen = screen; info->cur_x = x_root; info->cur_y = y_root; if (info->last_event) @@ -2272,13 +2265,11 @@ gtk_drag_motion_cb (GtkWidget *widget, gpointer data) { GtkDragSourceInfo *info = (GtkDragSourceInfo *)data; - GdkScreen *screen; double x_root, y_root; gdk_event_get_root_coords ((GdkEvent *)event, &x_root, &y_root); - screen = gdk_display_get_default_screen (gdk_event_get_display ((GdkEvent *)event)); - gtk_drag_update (info, screen, (int)x_root, (int)y_root, (GdkEvent *) event); + gtk_drag_update (info, (int)x_root, (int)y_root, (GdkEvent *) event); return TRUE; }