[mutter] frames: Don't use deprecated API to grab pointer position



commit 70db187c36fcc84b42668738e66397569522297e
Author: Jasper St. Pierre <jstpierre mecheye net>
Date:   Mon Oct 24 00:17:14 2011 -0400

    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 files changed, 5 insertions(+), 3 deletions(-)
---
diff --git a/src/ui/frames.c b/src/ui/frames.c
index 1444c1e..83003ee 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);
 



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]