diff options
-rw-r--r-- | src/ClientPattern.cc | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc index 937d96b..f8238dd 100644 --- a/src/ClientPattern.cc +++ b/src/ClientPattern.cc | |||
@@ -284,20 +284,9 @@ bool ClientPattern::match(const Focusable &win) const { | |||
284 | } | 284 | } |
285 | } else if ((*it)->prop == HEAD && | 285 | } else if ((*it)->prop == HEAD && |
286 | (*it)->orig == "[mouse]") { | 286 | (*it)->orig == "[mouse]") { |
287 | // use the mouse position to determine which | 287 | int mouse_head = win.screen().getCurrHead(); |
288 | // head to compare the window to | ||
289 | int x, y; | ||
290 | int win_x, win_y; // not used | ||
291 | Window root, child; // not used | ||
292 | unsigned int mask; // not used | ||
293 | if ( ! XQueryPointer(FbTk::App::instance()->display(), | ||
294 | win.screen().rootWindow().window(), | ||
295 | &root, &child, &x, &y, | ||
296 | &win_x, &win_y, &mask) ) { | ||
297 | return false; | ||
298 | } | ||
299 | char num[32]; | 288 | char num[32]; |
300 | sprintf(num, "%d", win.screen().getHead(x, y)); | 289 | sprintf(num, "%d", mouse_head); |
301 | if (!(*it)->negate ^ (getProperty((*it)->prop, win) == num)) | 290 | if (!(*it)->negate ^ (getProperty((*it)->prop, win) == num)) |
302 | return false; | 291 | return false; |
303 | 292 | ||