1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00

Variable workspace_count moved to the workspace object in the global namespace

The variable workspace_count, that contains the number of workspaces
is moved to the global workspace properties.

Now the screen is not needed to know the workspace_count.
This commit is contained in:
Rodolfo García Peñas (kix)
2013-10-08 00:56:30 +02:00
committed by Carlos R. Mafra
parent f60e65001b
commit 9e103a46e9
13 changed files with 87 additions and 87 deletions

View File

@@ -1567,7 +1567,7 @@ static void handleKeyPress(XEvent * event)
case WKBD_WORKSPACE1 ... WKBD_WORKSPACE10:
widx = command - WKBD_WORKSPACE1;
i = (scr->current_workspace / 10) * 10 + widx;
if (wPreferences.ws_advance || i < scr->workspace_count)
if (wPreferences.ws_advance || i < w_global.workspace.count)
wWorkspaceChange(scr, i);
break;
@@ -1584,7 +1584,7 @@ static void handleKeyPress(XEvent * event)
case WKBD_MOVE_WORKSPACE1 ... WKBD_MOVE_WORKSPACE10:
widx = command - WKBD_MOVE_WORKSPACE1;
i = (scr->current_workspace / 10) * 10 + widx;
if (wwin && (wPreferences.ws_advance || i < scr->workspace_count))
if (wwin && (wPreferences.ws_advance || i < w_global.workspace.count))
wWindowChangeWorkspace(wwin, i);
break;
@@ -1611,7 +1611,7 @@ static void handleKeyPress(XEvent * event)
column = scr->current_workspace % 10;
if (command == WKBD_MOVE_NEXTWSLAYER) {
if ((row + 1) * 10 < scr->workspace_count)
if ((row + 1) * 10 < w_global.workspace.count)
wWindowChangeWorkspace(wwin, column + (row + 1) * 10);
} else {
if (row > 0)
@@ -1731,7 +1731,7 @@ static void handleKeyPress(XEvent * event)
column = scr->current_workspace % 10;
if (command == WKBD_NEXTWSLAYER) {
if ((row + 1) * 10 < scr->workspace_count)
if ((row + 1) * 10 < w_global.workspace.count)
wWorkspaceChange(scr, column + (row + 1) * 10);
} else {
if (row > 0)