all repos — fluxbox @ a1d3065994daba4bb0d1b437981afff358377bd4

custom fork of the fluxbox windowmanager

Search actual tab under mouse

The feature suggests to behave like this bug actually only supported
mouse clicks (because the latest event window needed to be the tab)
This condition will break with two future patches (OnTitlebar context
selection and Sync Pointer grabbing) so the code to determine the tab
client needs to be a bit more sophisticated and, as a bonus, keyboard
shortcuts to activate the tab under the pointer will work as well =)
Thomas Lübking thomas.luebking@gmail.com
commit

a1d3065994daba4bb0d1b437981afff358377bd4

parent

8d88d9be176f255bb85b13a9719145127273467c

1 files changed, 10 insertions(+), 2 deletions(-)

jump to
M src/CurrentWindowCmd.ccsrc/CurrentWindowCmd.cc

@@ -227,8 +227,16 @@ public:

explicit ActivateTabCmd() { } protected: void real_execute() { - WinClient* winclient = fbwindow().winClientOfLabelButtonWindow( - Fluxbox::instance()->lastEvent().xany.window); + Window root, last = 0, + tab = Fluxbox::instance()->lastEvent().xany.window; + int junk; unsigned int ujunk; + WinClient *winclient = 0; + Display *dpy = Fluxbox::instance()->display(); + while (!winclient && tab && tab != last) { + last = tab; + XQueryPointer(dpy, tab, &root, &tab, &junk, &junk, &junk, &junk, &ujunk); + winclient = fbwindow().winClientOfLabelButtonWindow(tab); + } if (winclient && winclient != &fbwindow().winClient()) { fbwindow().setCurrentClient(*winclient, true);