mirror of
https://github.com/labwc/labwc.git
synced 2026-04-13 08:21:15 -04:00
Window switch, add workspace info and window state (M/m/F)
This commit is contained in:
parent
4ecac26548
commit
7513d6abc0
4 changed files with 25 additions and 3 deletions
20
src/osd.c
20
src/osd.c
|
|
@ -230,10 +230,10 @@ get_type(struct view *view)
|
|||
{
|
||||
switch (view->type) {
|
||||
case LAB_XDG_SHELL_VIEW:
|
||||
return "[xdg-shell]";
|
||||
return "[W] ";
|
||||
#if HAVE_XWAYLAND
|
||||
case LAB_XWAYLAND_VIEW:
|
||||
return "[xwayland]";
|
||||
return "[X] ";
|
||||
#endif
|
||||
}
|
||||
return "";
|
||||
|
|
@ -362,7 +362,23 @@ render_osd(struct server *server, cairo_t *cairo, int w, int h,
|
|||
|
||||
switch (field->content) {
|
||||
case LAB_FIELD_TYPE:
|
||||
if (rc.window_switcher.allworkspaces) {
|
||||
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, " ");
|
||||
}
|
||||
}
|
||||
buf_add(&buf, get_type(*view));
|
||||
if (rc.window_switcher.allworkspaces &&
|
||||
wl_list_length(&server->outputs) > 1) {
|
||||
buf_add(&buf, (*view)->output->wlr_output->name);
|
||||
}
|
||||
break;
|
||||
case LAB_FIELD_IDENTIFIER:
|
||||
buf_add(&buf, get_app_id(*view));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue