From 70db187c36fcc84b42668738e66397569522297e Mon Sep 17 00:00:00 2001 From: "Jasper St. Pierre" Date: Mon, 24 Oct 2011 00:17:14 -0400 Subject: [PATCH] frames: Don't use deprecated API to grab pointer position https://bugzilla.gnome.org/show_bug.cgi?id=662574 --- src/ui/frames.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ui/frames.c b/src/ui/frames.c index 1444c1ed9..83003ee49 100644 --- a/src/ui/frames.c +++ b/src/ui/frames.c @@ -1942,7 +1942,7 @@ meta_frames_motion_notify_event (GtkWidget *widget, Display *display; frames = META_FRAMES (widget); - display = GDK_DISPLAY_XDISPLAY (gdk_display_get_default ()); + display = GDK_DISPLAY_XDISPLAY (gdk_window_get_display (event->window)); frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window)); if (frame == NULL) @@ -1971,7 +1971,8 @@ meta_frames_motion_notify_event (GtkWidget *widget, MetaFrameControl control; int x, y; - gdk_window_get_pointer (frame->window, &x, &y, NULL); + gdk_window_get_device_position (frame->window, event->device, + &x, &y, NULL); /* Control is set to none unless it matches * the current grab @@ -2012,7 +2013,8 @@ meta_frames_motion_notify_event (GtkWidget *widget, MetaFrameControl control; int x, y; - gdk_window_get_pointer (frame->window, &x, &y, NULL); + gdk_window_get_device_position (frame->window, event->device, + &x, &y, NULL); control = get_control (frames, frame, x, y);