we already have a subroutine for this

This commit is contained in:
markt 2007-10-23 19:52:14 +00:00
parent 1c05af4329
commit da545ea02e

View file

@ -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;