Add config option to disable preview outlines

This commit is contained in:
Flrian 2022-08-24 20:27:08 +02:00 committed by Johan Malm
parent 33bc37e7d0
commit c1490b632d
5 changed files with 12 additions and 1 deletions

View 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>*

View 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 -->

View file

@ -55,6 +55,7 @@ struct rcxml {
/* cycle view (alt+tab) */
bool cycle_preview_contents;
bool cycle_preview_outlines;
struct {
int popuptime;

View 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);
}

View file

@ -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;