mirror of
https://github.com/labwc/labwc.git
synced 2026-04-13 08:21:15 -04:00
Window switcher, more code changes
This commit is contained in:
parent
cf7a4b0602
commit
1dfebf772f
1 changed files with 17 additions and 11 deletions
28
src/osd.c
28
src/osd.c
|
|
@ -230,18 +230,24 @@ get_type(struct view *view)
|
||||||
{
|
{
|
||||||
switch (view->type) {
|
switch (view->type) {
|
||||||
case LAB_XDG_SHELL_VIEW:
|
case LAB_XDG_SHELL_VIEW:
|
||||||
if (rc.window_switcher.all_workspaces) {
|
return "[xdg-shell]";
|
||||||
return "[W] ";
|
|
||||||
} else {
|
|
||||||
return "[xdg-shell]";
|
|
||||||
}
|
|
||||||
#if HAVE_XWAYLAND
|
#if HAVE_XWAYLAND
|
||||||
case LAB_XWAYLAND_VIEW:
|
case LAB_XWAYLAND_VIEW:
|
||||||
if (rc.window_switcher.all_workspaces) {
|
return "[xwayland]";
|
||||||
return "[X] ";
|
#endif
|
||||||
} else {
|
}
|
||||||
return "[xwayland]";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
static const char *
|
||||||
|
get_winfo(struct view *view)
|
||||||
|
{
|
||||||
|
switch (view->type) {
|
||||||
|
case LAB_XDG_SHELL_VIEW:
|
||||||
|
return "[W] ";
|
||||||
|
#if HAVE_XWAYLAND
|
||||||
|
case LAB_XWAYLAND_VIEW:
|
||||||
|
return "[X] ";
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
|
|
@ -385,7 +391,7 @@ render_osd(struct server *server, cairo_t *cairo, int w, int h,
|
||||||
buf_add(&buf, " ");
|
buf_add(&buf, " ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
buf_add(&buf, get_type(*view));
|
buf_add(&buf, get_winfo(*view));
|
||||||
if (rc.window_switcher.all_workspaces &&
|
if (rc.window_switcher.all_workspaces &&
|
||||||
wl_list_length(&server->outputs) > 1) {
|
wl_list_length(&server->outputs) > 1) {
|
||||||
buf_add(&buf, (*view)->output->wlr_output->name);
|
buf_add(&buf, (*view)->output->wlr_output->name);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue