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

https://bugzilla.gnome.org/show_bug.cgi?id=662574
This commit is contained in:
Jasper St. Pierre 2011-10-24 00:17:14 -04:00
parent 4de3f1d147
commit 70db187c36

View File

@ -1942,7 +1942,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
Display *display; Display *display;
frames = META_FRAMES (widget); 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)); frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
if (frame == NULL) if (frame == NULL)
@ -1971,7 +1971,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
MetaFrameControl control; MetaFrameControl control;
int x, y; 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 /* Control is set to none unless it matches
* the current grab * the current grab
@ -2012,7 +2013,8 @@ meta_frames_motion_notify_event (GtkWidget *widget,
MetaFrameControl control; MetaFrameControl control;
int x, y; 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); control = get_control (frames, frame, x, y);