1
0
mirror of https://github.com/gryf/wmaker.git synced 2026-01-04 04:44:16 +01:00

Add new cycling option

When using Xinerama, make it possible only to cycle between those
windows that are on the currently active head - AFAICT this means
windows that have the majority of their area on the same head as
the pointer.

Patch complete with WPrefs integration, alas this being quite
unusable - for a lack of a better idea, I tucked the option on the
expert panel, making the item list too tall - making it scrollable
would be a nice addition.

The default for the new option (CycleActiveHeadOnly) should be NO,
that is, no change in default behaviour.
This commit is contained in:
Tamas TEVESZ
2010-04-02 08:38:08 +02:00
committed by Carlos R. Mafra
parent 3f8248f534
commit b59575e709
4 changed files with 16 additions and 3 deletions

View File

@@ -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)