From 5205821fb91e72b41397df4d82d0fdf8bb1c4fa6 Mon Sep 17 00:00:00 2001
From: Adel Gadllah <adel.gadllah@gmail.com>
Date: Sun, 23 Jun 2013 21:18:21 +0200
Subject: [PATCH] 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.
---
 src/core/window.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/core/window.c b/src/core/window.c
index 5e450c6bb..7104e600b 100644
--- a/src/core/window.c
+++ b/src/core/window.c
@@ -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);