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 79ea9f0b0f
commit a20401782e

View File

@ -9009,7 +9009,7 @@ update_move (MetaWindow *window,
* refers to the monitor which contains the largest part of the window, * refers to the monitor which contains the largest part of the window,
* the latter to the one where the pointer is located. * 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, meta_window_get_work_area_for_monitor (window,
monitor->number, monitor->number,
&work_area); &work_area);