osd: add config option to disable osd

This commit is contained in:
Flrian 2023-03-08 15:26:49 +01:00 committed by Johan Malm
parent 5aa5c12371
commit 00ebcdc290
5 changed files with 17 additions and 6 deletions

View 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. be used with labwc the preferred mode of the monitor is used instead.
Default is no. Default is no.
*<core><cycleViewOSD>* [yes|no]
Draw the OSD when cycling between windows.
Default is yes.
*<core><cycleViewPreview>* [yes|no] *<core><cycleViewPreview>* [yes|no]
Preview the contents of the selected window when cycling between windows. Preview the contents of the selected window when cycling between windows.
Default is no. Default is no.

View file

@ -12,6 +12,7 @@
<gap>0</gap> <gap>0</gap>
<adaptiveSync>no</adaptiveSync> <adaptiveSync>no</adaptiveSync>
<reuseOutputMode>no</reuseOutputMode> <reuseOutputMode>no</reuseOutputMode>
<cycleViewOSD>yes</cycleViewOSD>
<cycleViewPreview>no</cycleViewPreview> <cycleViewPreview>no</cycleViewPreview>
<cycleViewOutlines>yes</cycleViewOutlines> <cycleViewOutlines>yes</cycleViewOutlines>
</core> </core>

View file

@ -53,6 +53,7 @@ struct rcxml {
bool snap_top_maximize; bool snap_top_maximize;
/* cycle view (alt+tab) */ /* cycle view (alt+tab) */
bool cycle_view_osd;
bool cycle_preview_contents; bool cycle_preview_contents;
bool cycle_preview_outlines; bool cycle_preview_outlines;

View file

@ -442,6 +442,8 @@ entry(xmlNode *node, char *nodename, char *content)
rc.snap_edge_range = atoi(content); rc.snap_edge_range = atoi(content);
} else if (!strcasecmp(nodename, "topMaximize.snapping")) { } else if (!strcasecmp(nodename, "topMaximize.snapping")) {
rc.snap_top_maximize = get_bool(content); 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")) { } else if (!strcasecmp(nodename, "cycleViewPreview.core")) {
rc.cycle_preview_contents = get_bool(content); rc.cycle_preview_contents = get_bool(content);
} else if (!strcasecmp(nodename, "cycleViewOutlines.core")) { } else if (!strcasecmp(nodename, "cycleViewOutlines.core")) {
@ -556,6 +558,7 @@ rcxml_init(void)
rc.screen_edge_strength = 20; rc.screen_edge_strength = 20;
rc.snap_edge_range = 1; rc.snap_edge_range = 1;
rc.snap_top_maximize = true; rc.snap_top_maximize = true;
rc.cycle_view_osd = true;
rc.cycle_preview_contents = false; rc.cycle_preview_contents = false;
rc.cycle_preview_outlines = true; rc.cycle_preview_outlines = true;
rc.workspace_config.popuptime = INT_MIN; rc.workspace_config.popuptime = INT_MIN;

View file

@ -403,12 +403,14 @@ osd_update(struct server *server)
return; return;
} }
/* Display the actual OSD */ if (rc.cycle_view_osd) {
struct output *output; /* Display the actual OSD */
wl_list_for_each(output, &server->outputs, link) { struct output *output;
destroy_osd_nodes(output); wl_list_for_each(output, &server->outputs, link) {
if (output_is_usable(output)) { destroy_osd_nodes(output);
display_osd(output); if (output_is_usable(output)) {
display_osd(output);
}
} }
} }