From da545ea02e95e9c28f41cc013db84fc71cb9278e Mon Sep 17 00:00:00 2001 From: markt Date: Tue, 23 Oct 2007 19:52:14 +0000 Subject: we already have a subroutine for this --- src/ClientPattern.cc | 15 ++------------- 1 file 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 { } } else if ((*it)->prop == HEAD && (*it)->orig == "[mouse]") { - // use the mouse position to determine which - // head to compare the window to - int x, y; - int win_x, win_y; // not used - Window root, child; // not used - unsigned int mask; // not used - if ( ! XQueryPointer(FbTk::App::instance()->display(), - win.screen().rootWindow().window(), - &root, &child, &x, &y, - &win_x, &win_y, &mask) ) { - return false; - } + int mouse_head = win.screen().getCurrHead(); char num[32]; - sprintf(num, "%d", win.screen().getHead(x, y)); + sprintf(num, "%d", mouse_head); if (!(*it)->negate ^ (getProperty((*it)->prop, win) == num)) return false; -- cgit v0.11.2