]> git.mdlowis.com Git - proto/labwc.git/commitdiff
osd: add config option to disable osd
authorFlrian <4444593+Flrian@users.noreply.github.com>
Wed, 8 Mar 2023 14:26:49 +0000 (15:26 +0100)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 8 Mar 2023 21:54:47 +0000 (21:54 +0000)
docs/labwc-config.5.scd
docs/rc.xml.all
include/config/rcxml.h
src/config/rcxml.c
src/osd.c

index f4e4b5f1bc0eaa596851381abdfb35a5e1b9c788..3a4280c34199dcedf508510f566d55322d18c3c5 100644 (file)
@@ -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.
 
+*<core><cycleViewOSD>* [yes|no]
+       Draw the OSD when cycling between windows.
+       Default is yes.
+
 *<core><cycleViewPreview>* [yes|no]
        Preview the contents of the selected window when cycling between windows.
        Default is no.
index d829f2a11efe0fbb779d932c75be966d04a84260..a92bc73091678f1500843ad6707e393451a567aa 100644 (file)
@@ -12,6 +12,7 @@
     <gap>0</gap>
     <adaptiveSync>no</adaptiveSync>
     <reuseOutputMode>no</reuseOutputMode>
+    <cycleViewOSD>yes</cycleViewOSD>
     <cycleViewPreview>no</cycleViewPreview>
     <cycleViewOutlines>yes</cycleViewOutlines>
   </core>
index 56586b25383c3508591742aab3e3309b7c2c3b1c..c9ddbcbe564bd48a1a2207d1c36783b5bb7cd2c0 100644 (file)
@@ -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;
 
index dd33750efa03537a0f8bbc0af4b82b3b3d155b42..15c95df6a02fba533930b503f5b7acde7e8dfac8 100644 (file)
@@ -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;
index 782ce6621ecb2dce1983d9001d4ed8ed0591c3a8..b63177783a62ba2e5b4f4f5a7e0d77620fd740eb 100644 (file)
--- 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);
+                       }
                }
        }