diff --git a/src/Options.cpp b/src/Options.cpp index 8e5124e..5268860 100644 --- a/src/Options.cpp +++ b/src/Options.cpp @@ -78,7 +78,9 @@ void Options::Load() message.FindRect("wind_rect", &wind_rect); message.FindMessage("columnsState", &columnsState); int8 tmp; - if (message.FindInt8("workspace_activation", &((int8)workspace_activation)) != B_OK) + if (message.FindInt8("workspace_activation", &tmp) == B_OK) + workspace_activation = static_cast(tmp); + else workspace_activation = current_workspace; if (message.FindInt32("workspaces", &workspaces) != B_OK) workspaces = 1; diff --git a/src/Options.h b/src/Options.h index b94e075..421221d 100644 --- a/src/Options.h +++ b/src/Options.h @@ -24,7 +24,7 @@ struct Options { int32 refresh; - enum { + enum workspace_type { current_workspace, all_workspaces, saved_workspace