fix(xworkspaces): Correct desktop index for pinned workspaces

- Use the correct desktop index when only displaying
workspaces for the configured monitor/viewport.

- Wrapping scroll
This commit is contained in:
Michael Carlberg 2016-12-03 13:45:22 +01:00
parent edbefbd8fa
commit d4eaf21052
2 changed files with 70 additions and 36 deletions
include/modules

View file

@ -29,10 +29,17 @@ namespace modules {
UNFOCUSED,
};
struct desktop {
explicit desktop(size_t index, desktop_state state, label_t&& label) : index(index), state(state), label(label) {}
size_t index;
desktop_state state;
label_t label;
};
struct viewport {
position pos;
string name;
vector<pair<desktop_state, label_t>> desktops;
vector<unique_ptr<desktop>> desktops;
viewport_state state;
label_t label;
};