diff options
author | markt <markt> | 2007-10-23 19:52:14 (GMT) |
---|---|---|
committer | markt <markt> | 2007-10-23 19:52:14 (GMT) |
commit | da545ea02e95e9c28f41cc013db84fc71cb9278e (patch) | |
tree | 1f5e2c1fd6165f2fa92301712041c218b807aed6 | |
parent | 1c05af4329e62b8bfaf3c0f032c52ace4eaa5975 (diff) | |
download | fluxbox-da545ea02e95e9c28f41cc013db84fc71cb9278e.zip fluxbox-da545ea02e95e9c28f41cc013db84fc71cb9278e.tar.bz2 |
we already have a subroutine for this
-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 | ||