From: Flrian <4444593+Flrian@users.noreply.github.com> Date: Wed, 8 Mar 2023 14:26:49 +0000 (+0100) Subject: osd: add config option to disable osd X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=00ebcdc290d0597c2e1f98b2b429c8c06d49c309;p=proto%2Flabwc.git osd: add config option to disable osd --- diff --git a/docs/labwc-config.5.scd b/docs/labwc-config.5.scd index f4e4b5f1..3a4280c3 100644 --- a/docs/labwc-config.5.scd +++ b/docs/labwc-config.5.scd @@ -77,6 +77,10 @@ The rest of this man page describes configuration options. be used with labwc the preferred mode of the monitor is used instead. Default is no. +** [yes|no] + Draw the OSD when cycling between windows. + Default is yes. + ** [yes|no] Preview the contents of the selected window when cycling between windows. Default is no. diff --git a/docs/rc.xml.all b/docs/rc.xml.all index d829f2a1..a92bc730 100644 --- a/docs/rc.xml.all +++ b/docs/rc.xml.all @@ -12,6 +12,7 @@ 0 no no + yes no yes diff --git a/include/config/rcxml.h b/include/config/rcxml.h index 56586b25..c9ddbcbe 100644 --- a/include/config/rcxml.h +++ b/include/config/rcxml.h @@ -53,6 +53,7 @@ struct rcxml { bool snap_top_maximize; /* cycle view (alt+tab) */ + bool cycle_view_osd; bool cycle_preview_contents; bool cycle_preview_outlines; diff --git a/src/config/rcxml.c b/src/config/rcxml.c index dd33750e..15c95df6 100644 --- a/src/config/rcxml.c +++ b/src/config/rcxml.c @@ -442,6 +442,8 @@ entry(xmlNode *node, char *nodename, char *content) rc.snap_edge_range = atoi(content); } else if (!strcasecmp(nodename, "topMaximize.snapping")) { rc.snap_top_maximize = get_bool(content); + } else if (!strcasecmp(nodename, "cycleViewOSD.core")) { + rc.cycle_view_osd = get_bool(content); } else if (!strcasecmp(nodename, "cycleViewPreview.core")) { rc.cycle_preview_contents = get_bool(content); } else if (!strcasecmp(nodename, "cycleViewOutlines.core")) { @@ -556,6 +558,7 @@ rcxml_init(void) rc.screen_edge_strength = 20; rc.snap_edge_range = 1; rc.snap_top_maximize = true; + rc.cycle_view_osd = true; rc.cycle_preview_contents = false; rc.cycle_preview_outlines = true; rc.workspace_config.popuptime = INT_MIN; diff --git a/src/osd.c b/src/osd.c index 782ce662..b6317778 100644 --- a/src/osd.c +++ b/src/osd.c @@ -403,12 +403,14 @@ osd_update(struct server *server) return; } - /* Display the actual OSD */ - struct output *output; - wl_list_for_each(output, &server->outputs, link) { - destroy_osd_nodes(output); - if (output_is_usable(output)) { - display_osd(output); + if (rc.cycle_view_osd) { + /* Display the actual OSD */ + struct output *output; + wl_list_for_each(output, &server->outputs, link) { + destroy_osd_nodes(output); + if (output_is_usable(output)) { + display_osd(output); + } } }