mirror of
https://github.com/gryf/wmaker.git
synced 2026-01-12 01:14:21 +01:00
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.
39 lines
1.3 KiB
C
39 lines
1.3 KiB
C
/*
|
|
* Window Maker window manager
|
|
*
|
|
* Copyright (c) 1997-2004 Alfredo K. Kojima
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; either version 2 of the License, or
|
|
* (at your option) any later version.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*
|
|
* You should have received a copy of the GNU General Public License
|
|
* along with this program; if not, write to the Free Software
|
|
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307,
|
|
* USA.
|
|
*/
|
|
|
|
#ifndef _SWITCHPANEL_H_
|
|
#define _SWITCHPANEL_H_
|
|
|
|
typedef struct SwitchPanel WSwitchPanel;
|
|
|
|
WSwitchPanel *wInitSwitchPanel(WScreen *scr, WWindow *curwin, int workspace, Bool class_only);
|
|
|
|
void wSwitchPanelDestroy(WSwitchPanel *panel);
|
|
|
|
WWindow *wSwitchPanelSelectNext(WSwitchPanel *panel, int back);
|
|
WWindow *wSwitchPanelSelectFirst(WSwitchPanel *panel, int back);
|
|
|
|
WWindow *wSwitchPanelHandleEvent(WSwitchPanel *panel, XEvent *event);
|
|
|
|
Window wSwitchPanelGetWindow(WSwitchPanel *swpanel);
|
|
|
|
#endif /* _SWITCHPANEL_H_ */
|