diff --git a/src/config/preset.h b/src/config/preset.h index ae4424f9..74554a2b 100644 --- a/src/config/preset.h +++ b/src/config/preset.h @@ -207,7 +207,7 @@ enum libinput_config_tap_button_map button_map = LIBINPUT_CONFIG_TAP_MAP_LRM; #define MODKEY WLR_MODIFIER_ALT static const char *tags[] = { - "1", "2", "3", "4", "5", "6", "7", "8", "9", + "1", "2", "3", "4", "5", "6", "7", "8", "9", "10" }; float focused_opacity = 1.0; diff --git a/src/ext-protocol/ext-workspace.h b/src/ext-protocol/ext-workspace.h index 28aaeeeb..522cbdf9 100644 --- a/src/ext-protocol/ext-workspace.h +++ b/src/ext-protocol/ext-workspace.h @@ -71,7 +71,7 @@ static void handle_ext_workspace_deactivate(struct wl_listener *listener, static const char *get_name_from_tag(uint32_t tag) { static const char *names[] = {"overview", "1", "2", "3", "4", - "5", "6", "7", "8", "9"}; + "5", "6", "7", "8", "9", "10"}; return (tag < sizeof(names) / sizeof(names[0])) ? names[tag] : NULL; } diff --git a/src/fetch/monitor.h b/src/fetch/monitor.h index 7a1ca4dc..205fd885 100644 --- a/src/fetch/monitor.h +++ b/src/fetch/monitor.h @@ -63,8 +63,8 @@ uint32_t get_tags_first_tag_num(uint32_t source_tags) { if (i == 1) { return 1; - } else if (i > 9) { - return 9; + } else if (i >= LENGTH(tags)) { + return LENGTH(tags); } else { return i; } @@ -85,8 +85,8 @@ uint32_t get_tags_first_tag(uint32_t source_tags) { if (i == 1) { return 1; - } else if (i > 9) { - return 1 << 8; + } else if (i > LENGTH(tags)) { + return 1 << (LENGTH(tags) - 1); } else { return 1 << (i - 1); }