1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-24 15:12:32 +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

@@ -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];

View File

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

View File

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