From af9e806e6a2337348ddc33fa4b5caf076dc7139a Mon Sep 17 00:00:00 2001
From: Olivier Fourdan <fourdan.olivier@wanadoo.fr>
Date: Tue, 8 Feb 2005 22:13:03 +0000
Subject: [PATCH] Don't get through excluded windows when searching windows ata
 given position.

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

diff --git a/src/stacking.c b/src/stacking.c
index df8f584c0..4d841e604 100644
--- a/src/stacking.c
+++ b/src/stacking.c
@@ -245,14 +245,15 @@ 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 (clientSelectMask (c2, 0, WINDOW_NORMAL | WINDOW_DIALOG | WINDOW_MODAL_DIALOG) && (c2 != exclude))
+        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, 0, WINDOW_REGULAR_FOCUSABLE) 
+                && (c2 != exclude))
             {
                 c = c2;
-                break;
             }
+            break;
         }
     }
 
-- 
GitLab