From 5736234eed9c969c1b382bb95d7bb00e69f4a8a9 Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <fourdan.olivier@wanadoo.fr>
Date: Sun, 22 Apr 2007 21:02:58 +0000
Subject: [PATCH] Fix strick bound checking causing wrong window to be focused
 in focus follow mouse (Bug #2781)

(Old svn revision: 25626)
---
 src/stacking.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/stacking.c b/src/stacking.c
index 195c63798..0db89c73e 100644
--- a/src/stacking.c
+++ b/src/stacking.c
@@ -255,8 +255,8 @@ clientAtPosition (ScreenInfo *screen_info, int x, int y, Client * exclude)
     for (index = g_list_last (screen_info->windows_stack); index; index = g_list_previous (index))
     {
         c2 = (Client *) index->data;
-        if ((frameX (c2) < x) && (frameX (c2) + frameWidth (c2) > x)
-            && (frameY (c2) < y) && (frameY (c2) + frameHeight (c2) > y))
+        if ((frameX (c2) <= x) && (frameX (c2) + frameWidth (c2) >= x)
+            && (frameY (c2) <= y) && (frameY (c2) + frameHeight (c2) >= y))
         {
             if (clientSelectMask (c2, INCLUDE_SKIP_PAGER | INCLUDE_SKIP_TASKBAR, WINDOW_REGULAR_FOCUSABLE)
                 && (c2 != exclude))
-- 
GitLab