mirror of
https://github.com/labwc/labwc.git
synced 2026-04-13 08:21:15 -04:00
Window switcher, more changes
This commit is contained in:
parent
12a9aba0fd
commit
7e8c8b6a5a
4 changed files with 31 additions and 20 deletions
|
|
@ -206,8 +206,14 @@ fill_window_switcher_field(char *nodename, char *content)
|
|||
current_field->content = LAB_FIELD_TRIMMED_IDENTIFIER;
|
||||
} else if (!strcmp(content, "title")) {
|
||||
current_field->content = LAB_FIELD_TITLE;
|
||||
} else if (!strcmp(content, "winfo")) {
|
||||
current_field->content = LAB_FIELD_WINFO;
|
||||
} else if (!strcmp(content, "workspace")) {
|
||||
current_field->content = LAB_FIELD_WORKSPACE;
|
||||
} else if (!strcmp(content, "state")) {
|
||||
current_field->content = LAB_FIELD_WIN_STATE;
|
||||
} else if (!strcmp(content, "type_short")) {
|
||||
current_field->content = LAB_FIELD_TYPE_SHORT;
|
||||
} else if (!strcmp(content, "output")) {
|
||||
current_field->content = LAB_FIELD_OUTPUT;
|
||||
} else {
|
||||
wlr_log(WLR_ERROR, "bad windowSwitcher field '%s'", content);
|
||||
}
|
||||
|
|
@ -897,8 +903,7 @@ entry(xmlNode *node, char *nodename, char *content)
|
|||
} else if (!strcasecmp(nodename, "outlines.windowSwitcher")) {
|
||||
set_bool(content, &rc.window_switcher.outlines);
|
||||
} else if (!strcasecmp(nodename, "allWorkspaces.windowSwitcher")) {
|
||||
set_bool(content, &rc.window_switcher.all_workspaces);
|
||||
if (rc.window_switcher.all_workspaces) {
|
||||
if (parse_bool(content, -1) == true) {
|
||||
rc.window_switcher.criteria &=
|
||||
~LAB_VIEW_CRITERIA_CURRENT_WORKSPACE;
|
||||
}
|
||||
|
|
|
|||
30
src/osd.c
30
src/osd.c
|
|
@ -378,20 +378,24 @@ render_osd(struct server *server, cairo_t *cairo, int w, int h,
|
|||
case LAB_FIELD_TYPE:
|
||||
buf_add(&buf, get_type(*view));
|
||||
break;
|
||||
case LAB_FIELD_WINFO:
|
||||
if (rc.window_switcher.all_workspaces) {
|
||||
buf_add(&buf, (*view)->workspace->name);
|
||||
}
|
||||
if ((*view)->maximized) {
|
||||
buf_add(&buf, " M ");
|
||||
} else if ((*view)->minimized) {
|
||||
buf_add(&buf, " m ");
|
||||
} else if ((*view)->fullscreen) {
|
||||
buf_add(&buf, " F ");
|
||||
} else {
|
||||
buf_add(&buf, " ");
|
||||
}
|
||||
case LAB_FIELD_TYPE_SHORT:
|
||||
buf_add(&buf, get_winfo(*view));
|
||||
break;
|
||||
case LAB_FIELD_WORKSPACE:
|
||||
buf_add(&buf, (*view)->workspace->name);
|
||||
break;
|
||||
case LAB_FIELD_WIN_STATE:
|
||||
if ((*view)->maximized) {
|
||||
buf_add(&buf, "M");
|
||||
} else if ((*view)->minimized) {
|
||||
buf_add(&buf, "m");
|
||||
} else if ((*view)->fullscreen) {
|
||||
buf_add(&buf, "F");
|
||||
} else {
|
||||
buf_add(&buf, " ");
|
||||
}
|
||||
break;
|
||||
case LAB_FIELD_OUTPUT:
|
||||
if (wl_list_length(&server->outputs) > 1 &&
|
||||
output_is_usable((*view)->output)) {
|
||||
buf_add(&buf, (*view)->output->wlr_output->name);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue