]> git.mdlowis.com Git - proto/labwc.git/commitdiff
Add config option to disable preview outlines
authorFlrian <4444593+Flrian@users.noreply.github.com>
Wed, 24 Aug 2022 18:27:08 +0000 (20:27 +0200)
committerJohan Malm <johanmalm@users.noreply.github.com>
Wed, 24 Aug 2022 19:21:14 +0000 (20:21 +0100)
docs/labwc-config.5.scd
docs/rc.xml.all
include/config/rcxml.h
src/config/rcxml.c
src/osd.c

index 08a6f87a5c102aa55e5a2c69bef3584985665484..845da4a97fefe8c9a764f4cc1089a69af1878011 100644 (file)
@@ -71,6 +71,10 @@ The rest of this man page describes configuration options.
        Preview the contents of the selected window when cycling between windows.
        Default is no.
 
+*<core><cycleViewOutlines>* [yes|no]
+       Draw an outline around the selected window when cycling between windows.
+       Default is yes.
+
 ## RESISTANCE
 
 *<resistance><screenEdgeStrength>*
index 18ed01edbfc5ecc347fee979d63c28e371ddac83..390599f89c538f43ee0993ab80ebd067f792eac5 100644 (file)
@@ -12,6 +12,7 @@
     <gap>0</gap>
     <adaptiveSync>no</adaptiveSync>
     <cycleViewPreview>no</cycleViewPreview>
+    <cycleViewOutlines>yes</cycleViewOutlines>
   </core>
 
   <!-- <font><theme> can be defined without an attribute to set all places -->
index 5827f51a3ef8414fd8f000229eb26a416a4140dc..3f6b248db601b5459a6e84ec4779604cb3850dda 100644 (file)
@@ -55,6 +55,7 @@ struct rcxml {
 
        /* cycle view (alt+tab) */
        bool cycle_preview_contents;
+       bool cycle_preview_outlines;
 
        struct {
                int popuptime;
index ece597635d0aff0eafccf8b429005b928bf75d4c..2065c580ac0cba5058b5b7cd9519df6f21064504 100644 (file)
@@ -388,6 +388,8 @@ entry(xmlNode *node, char *nodename, char *content)
                rc.snap_top_maximize = get_bool(content);
        } else if (!strcasecmp(nodename, "cycleViewPreview.core")) {
                rc.cycle_preview_contents = get_bool(content);
+       } else if (!strcasecmp(nodename, "cycleViewOutlines.core")) {
+               rc.cycle_preview_outlines = get_bool(content);
        } else if (!strcasecmp(nodename, "name.names.desktops")) {
                struct workspace *workspace = calloc(1, sizeof(struct workspace));
                workspace->name = strdup(content);
@@ -493,6 +495,7 @@ rcxml_init()
        rc.snap_edge_range = 1;
        rc.snap_top_maximize = true;
        rc.cycle_preview_contents = false;
+       rc.cycle_preview_outlines = true;
        rc.workspace_config.popuptime = INT_MIN;
        wl_list_init(&rc.workspace_config.workspaces);
 }
index 7bbd8ad4bad8f94c7988d90915c625b448f0b7cf..7de869beb57c14a35c6d4a068713e20287049ec3 100644 (file)
--- a/src/osd.c
+++ b/src/osd.c
@@ -193,7 +193,9 @@ osd_update(struct server *server)
                                cairo_rectangle(cairo, OSD_BORDER_WIDTH, y,
                                        OSD_ITEM_WIDTH, OSD_ITEM_HEIGHT);
                                cairo_stroke(cairo);
-                               osd_update_preview_outlines(view);
+                               if (rc.cycle_preview_outlines) {
+                                       osd_update_preview_outlines(view);
+                               }
                                break;
                        }
                        y += OSD_ITEM_HEIGHT;