[gtk+] gtk: Stop using gdk_event_get_screen
- From: Matthias Clasen <matthiasc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk+] gtk: Stop using gdk_event_get_screen
- Date: Tue, 31 Oct 2017 02:22:28 +0000 (UTC)
commit f63d01b7820b35226cdef20fe57cf0d37c7bde98
Author: Matthias Clasen <mclasen redhat com>
Date: Mon Oct 30 22:15:57 2017 -0400
gtk: Stop using gdk_event_get_screen
Use gdk_event_get_display instead.
gtk/gtkdnd.c | 4 ++--
gtk/gtkmenu.c | 6 +-----
2 files changed, 3 insertions(+), 7 deletions(-)
---
diff --git a/gtk/gtkdnd.c b/gtk/gtkdnd.c
index 935cc22..62f93c3 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 3092d61..ad61884 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)
{
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]