Commit 799de4f0 authored by Jasper St. Pierre's avatar Jasper St. Pierre
Browse files

frames: Don't make a round trip to the X server for every MotionNotify

Instead, simply use the coordinates that were passed to us from the
MotionNotify event.
parent c34b5c1c
......@@ -1579,7 +1579,6 @@ meta_frames_motion_notify_event (GtkWidget *widget,
MetaUIFrame *frame;
MetaFrames *frames;
MetaFrameControl control;
int x, y;
frames = META_FRAMES (widget);
frame = meta_frames_lookup_window (frames, GDK_WINDOW_XID (event->window));
......@@ -1588,9 +1587,7 @@ meta_frames_motion_notify_event (GtkWidget *widget,
frames->last_motion_frame = frame;
gdk_window_get_device_position (frame->window, event->device,
&x, &y, NULL);
control = get_control (frames, frame, x, y);
control = get_control (frames, frame, event->x, event->y);
if (frame->button_state == META_BUTTON_STATE_PRESSED)
......@@ -226,6 +226,8 @@ maybe_redirect_mouse_event (XEvent *xevent)
gevent = gdk_event_new (GDK_MOTION_NOTIFY);
gevent->motion.window = g_object_ref (gdk_window);
gevent->motion.time = xev_d->time;
gevent->motion.x = xev_d->event_x;
gevent->motion.y = xev_d->event_y;
gevent->motion.x_root = xev_d->root_x;
gevent->motion.y_root = xev_d->root_y;
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment