diff --git a/WPrefs.app/Expert.c b/WPrefs.app/Expert.c index 6d4421dc..b8f8b465 100644 --- a/WPrefs.app/Expert.c +++ b/WPrefs.app/Expert.c @@ -32,7 +32,7 @@ typedef struct _Panel { WMWidget *parent; - WMButton *swi[8]; + WMButton *swi[9]; } _Panel; @@ -50,6 +50,7 @@ static void showData(_Panel * panel) WMSetButtonSelected(panel->swi[5], GetBoolForKey("DisableBlinking")); WMSetButtonSelected(panel->swi[6], GetBoolForKey("AntialiasedText")); WMSetButtonSelected(panel->swi[7], GetBoolForKey("SingleClickLaunch")); + WMSetButtonSelected(panel->swi[8], GetBoolForKey("CycleActiveHeadOnly")); } static void createPanel(Panel * p) @@ -60,12 +61,14 @@ static void createPanel(Panel * p) panel->box = WMCreateBox(panel->parent); WMSetViewExpandsToParent(WMWidgetView(panel->box), 2, 2, 2, 2); - for (i = 0; i < 8; i++) { + for (i = 0; i < 9; i++) { panel->swi[i] = WMCreateSwitchButton(panel->box); WMResizeWidget(panel->swi[i], FRAME_WIDTH - 40, 25); WMMoveWidget(panel->swi[i], 20, 20 + i * 25); } + /* XXX: it would be HIGHLY desireable if this could scroll vertically */ + WMSetButtonText(panel->swi[0], _("Disable miniwindows (icons for minimized windows). For use with KDE/GNOME.")); WMSetButtonText(panel->swi[1], _("Do not set non-WindowMaker specific parameters (do not use xset).")); @@ -75,6 +78,7 @@ static void createPanel(Panel * p) WMSetButtonText(panel->swi[5], _("Disable selection animation for selected icons.")); WMSetButtonText(panel->swi[6], _("Smooth font edges (needs restart).")); WMSetButtonText(panel->swi[7], _("Launch applications and restore windows with a single click.")); + WMSetButtonText(panel->swi[8], _("Cycle windows only on the active head.")); WMSetButtonEnabled(panel->swi[6], True); @@ -98,6 +102,7 @@ static void storeDefaults(_Panel * panel) SetBoolForKey(WMGetButtonSelected(panel->swi[5]), "DisableBlinking"); SetBoolForKey(WMGetButtonSelected(panel->swi[6]), "AntialiasedText"); SetBoolForKey(WMGetButtonSelected(panel->swi[7]), "SingleClickLaunch"); + SetBoolForKey(WMGetButtonSelected(panel->swi[8]), "CycleActiveHeadOnly"); } Panel *InitExpert(WMScreen * scr, WMWidget * parent) diff --git a/src/WindowMaker.h b/src/WindowMaker.h index 1a5b3237..9ec628b7 100644 --- a/src/WindowMaker.h +++ b/src/WindowMaker.h @@ -413,6 +413,7 @@ typedef struct WPreferences { char workspace_border_position; /* Where to leave a workspace border */ char single_click; /* single click to lauch applications */ int history_lines; /* history of "Run..." dialog */ + char cycle_active_head_only; /* Cycle only windows on the active head */ RImage *swtileImage; RImage *swbackImage[9]; diff --git a/src/defaults.c b/src/defaults.c index a02a03b1..19e35b1d 100644 --- a/src/defaults.c +++ b/src/defaults.c @@ -655,7 +655,9 @@ WDefaultEntry optionList[] = { {"SelectCursor", "(builtin, cross)", (void *)WCUR_SELECT, NULL, getCursor, setCursor}, {"DialogHistoryLines", "500", NULL, - &wPreferences.history_lines, getInt, NULL} + &wPreferences.history_lines, getInt, NULL}, + {"CycleActiveHeadOnly", "NO", NULL, + &wPreferences.cycle_active_head_only, getBool, NULL} }; #if 0 diff --git a/src/switchpanel.c b/src/switchpanel.c index 39797289..46f5d478 100644 --- a/src/switchpanel.c +++ b/src/switchpanel.c @@ -80,6 +80,11 @@ static int canReceiveFocus(WWindow * wwin) { if (wwin->frame->workspace != wwin->screen_ptr->current_workspace) return 0; + + if (wPreferences.cycle_active_head_only && + wGetHeadForWindow(wwin) != wGetHeadForPointerLocation(wwin->screen_ptr)) + return 0; + if (!wwin->flags.mapped) { if (!wwin->flags.shaded && !wwin->flags.miniaturized && !wwin->flags.hidden) return 0;