diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c index 935cc2290d..62f93c3660 100644 --- a/gtk/gtkdnd.c +++ b/gtk/gtkdnd.c @@ -1348,7 +1348,7 @@ gtk_drag_begin_internal (GtkWidget *widget, info->destroy_icon = FALSE; if (event) - info->cur_screen = gdk_event_get_screen (event); + info->cur_screen = gdk_display_get_default_screen (gdk_event_get_display (event)); else gdk_device_get_position (pointer, &info->cur_screen, NULL, NULL); @@ -2279,7 +2279,7 @@ gtk_drag_motion_cb (GtkWidget *widget, double x_root, y_root; gdk_event_get_root_coords ((GdkEvent *)event, &x_root, &y_root); - screen = gdk_event_get_screen ((GdkEvent *)event); + 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); diff --git a/gtk/gtkmenu.c b/gtk/gtkmenu.c index 3092d61081..ad61884909 100644 --- a/gtk/gtkmenu.c +++ b/gtk/gtkmenu.c @@ -1883,7 +1883,6 @@ get_device_for_event (const GdkEvent *event) { GdkDevice *device = NULL; GdkSeat *seat = NULL; - GdkScreen *screen = NULL; GdkDisplay *display = NULL; device = gdk_event_get_device (event); @@ -1895,10 +1894,7 @@ get_device_for_event (const GdkEvent *event) if (!seat) { - screen = gdk_event_get_screen (event); - - if (screen) - display = gdk_screen_get_display (screen); + display = gdk_event_get_display (event); if (!display) {