we already have a subroutine for this
This commit is contained in:
parent
1c05af4329
commit
da545ea02e
1 changed files with 2 additions and 13 deletions
|
@ -284,20 +284,9 @@ bool ClientPattern::match(const Focusable &win) const {
|
||||||
}
|
}
|
||||||
} else if ((*it)->prop == HEAD &&
|
} else if ((*it)->prop == HEAD &&
|
||||||
(*it)->orig == "[mouse]") {
|
(*it)->orig == "[mouse]") {
|
||||||
// use the mouse position to determine which
|
int mouse_head = win.screen().getCurrHead();
|
||||||
// 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;
|
|
||||||
}
|
|
||||||
char num[32];
|
char num[32];
|
||||||
sprintf(num, "%d", win.screen().getHead(x, y));
|
sprintf(num, "%d", mouse_head);
|
||||||
if (!(*it)->negate ^ (getProperty((*it)->prop, win) == num))
|
if (!(*it)->negate ^ (getProperty((*it)->prop, win) == num))
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue