aboutsummaryrefslogtreecommitdiff
path: root/src/ClientPattern.cc
diff options
context:
space:
mode:
Diffstat (limited to 'src/ClientPattern.cc')
-rw-r--r--src/ClientPattern.cc19
1 files changed, 19 insertions, 0 deletions
diff --git a/src/ClientPattern.cc b/src/ClientPattern.cc
index 538b708..3cb9e9f 100644
--- a/src/ClientPattern.cc
+++ b/src/ClientPattern.cc
@@ -275,6 +275,25 @@ bool ClientPattern::match(const Focusable &win) const {
275 getProperty((*it)->prop, *focused)) 275 getProperty((*it)->prop, *focused))
276 return false; 276 return false;
277 } 277 }
278 } else if ((*it)->prop == HEAD &&
279 (*it)->orig == "[mouse]") {
280 // use the mouse position to determine which
281 // head to compare the window to
282 int x, y;
283 int win_x, win_y; // not used
284 Window root, child; // not used
285 unsigned int mask; // not used
286 if ( ! XQueryPointer(FbTk::App::instance()->display(),
287 win.screen().rootWindow().window(),
288 &root, &child, &x, &y,
289 &win_x, &win_y, &mask) ) {
290 return false;
291 }
292 char num[32];
293 sprintf(num, "%d", win.screen().getHead(x, y));
294 if (getProperty((*it)->prop, win) != num)
295 return false;
296
278 } else if (!(*it)->regexp.match(getProperty((*it)->prop, win))) 297 } else if (!(*it)->regexp.match(getProperty((*it)->prop, win)))
279 return false; 298 return false;
280 } 299 }