window: Reuse current pointer position for monitor checks

Avoid a round trip to the xserver we already have the current position
anyway. Querying from the server on every move can cause the compositor to
stall during movement.
This commit is contained in:
Adel Gadllah 2013-06-23 21:18:21 +02:00
parent 7187206ef5
commit 5205821fb9

View File

@ -8916,7 +8916,7 @@ update_move (MetaWindow *window,
* refers to the monitor which contains the largest part of the window,
* the latter to the one where the pointer is located.
*/
monitor = meta_screen_get_current_monitor_info (window->screen);
monitor = meta_screen_get_current_monitor_info_for_pos (window->screen, x, y);
meta_window_get_work_area_for_monitor (window,
monitor->number,
&work_area);