Mac OS X-style window cycling.
commit18408fff93468c533bf4aef3ce6c9808b415adde
authorIain Patterson <wm@iain.cx>
Mon, 14 Sep 2009 13:37:15 +0000 (14 14:37 +0100)
committerCarlos R. Mafra <crmafra@gmail.com>
Mon, 14 Sep 2009 14:51:26 +0000 (14 16:51 +0200)
tree257331c6d3fba7e0519d695e5f9c8c987e3c4190
parent5c46f48898e7307ef28cc8d65294809877893585
Mac OS X-style window cycling.

For those not familiar with the way Macs cycle windows, the Command-Tab
sequence (Alt-Tab elsewhere) switches between DIFFERENT application windows
and Command-Grave (key above tab) switches between windows owned by the
SAME application as is currently focused.  So if you had three Safari and
two Finder windows open, and Safari had focus, Command-Tab would switch to
Finder; Command-Tab would switch back to Safari; Command-Grave would switch
to a different Safari window etc.

This patch implements "something like" the above by only populating the
switchpanel with windows matching the currently-focused WWindow's wm_class
when the new cycling mode is activated.  In practice this means you can
switch to The Next XTerm or The Next Firefox Window using this method.

The configuration names for these new shortcuts are GroupNext and
GroupPrev.  The patch tells WPrefs.app about them.  Of course switching to
The Next Window is still possible with the (unchanged) FocusNext and
FocusPrev keys.
WPrefs.app/KeyboardShortcuts.c
src/cycling.c
src/defaults.c
src/event.c
src/funcs.h
src/keybind.h
src/switchpanel.c
src/switchpanel.h