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:
committed by
Carlos R. Mafra
parent
f60e65001b
commit
9e103a46e9
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user