all repos — fluxbox @ c2badda58a53ed00f8a53e9ce162d52669296741

custom fork of the fluxbox windowmanager

added [mouse] pattern, matches against prop HEAD and the mouse position
fluxgen fluxgen
commit

c2badda58a53ed00f8a53e9ce162d52669296741

parent

1748e8ec25e4236d85e6783aa9a8026c6329376f

2 files changed, 25 insertions(+), 0 deletions(-)

jump to
M ChangeLogChangeLog

@@ -1,6 +1,12 @@

(Format: Year/Month/Day) Changes for 1.0.1: *07/10/22: + * Added option "mouse" to client pattern ( Henrik ) + This is usefull for xinerama. For example: + Mod1 Tab :NextWindow (head=[mouse]) + This will cycle focus through windows that are on the same head as + the mouse pointer. + ClientPattern.cc * Fixed crash bug at restart. ( Henrik ) Window.cc * Replaced modKey with new commands StartMoving and StartResizing (Mark)
M src/ClientPattern.ccsrc/ClientPattern.cc

@@ -275,6 +275,25 @@ if (!focused || getProperty((*it)->prop, win) !=

getProperty((*it)->prop, *focused)) return false; } + } 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; + } + char num[32]; + sprintf(num, "%d", win.screen().getHead(x, y)); + if (getProperty((*it)->prop, win) != num) + return false; + } else if (!(*it)->regexp.match(getProperty((*it)->prop, win))) return false; }