mirror of
https://github.com/labwc/labwc.git
synced 2025-11-03 09:01:51 -05:00
config: move cycle_* bools to window_switcher struct
This commit is contained in:
parent
0f37c04df0
commit
693c5bd937
3 changed files with 20 additions and 20 deletions
|
|
@ -66,11 +66,6 @@ struct rcxml {
|
|||
int snap_edge_range;
|
||||
bool snap_top_maximize;
|
||||
|
||||
/* cycle view (alt+tab) */
|
||||
bool cycle_view_osd;
|
||||
bool cycle_preview_contents;
|
||||
bool cycle_preview_outlines;
|
||||
|
||||
struct {
|
||||
int popuptime;
|
||||
struct wl_list workspaces; /* struct workspace.link */
|
||||
|
|
@ -80,6 +75,9 @@ struct rcxml {
|
|||
struct wl_list regions; /* struct region.link */
|
||||
|
||||
struct {
|
||||
bool show;
|
||||
bool preview;
|
||||
bool outlines;
|
||||
struct wl_list fields; /* struct window_switcher_field.link */
|
||||
} window_switcher;
|
||||
};
|
||||
|
|
|
|||
|
|
@ -482,11 +482,11 @@ entry(xmlNode *node, char *nodename, char *content)
|
|||
|
||||
/* <windowSwitcher show="" preview="" outlines="" /> */
|
||||
} else if (!strcasecmp(nodename, "show.windowSwitcher")) {
|
||||
rc.cycle_view_osd = get_bool(content);
|
||||
rc.window_switcher.show = get_bool(content);
|
||||
} else if (!strcasecmp(nodename, "preview.windowSwitcher")) {
|
||||
rc.cycle_preview_contents = get_bool(content);
|
||||
rc.window_switcher.preview = get_bool(content);
|
||||
} else if (!strcasecmp(nodename, "outlines.windowSwitcher")) {
|
||||
rc.cycle_preview_outlines = get_bool(content);
|
||||
rc.window_switcher.outlines = get_bool(content);
|
||||
|
||||
/* Remove this long term - just a friendly warning for now */
|
||||
} else if (strstr(nodename, "windowswitcher.core")) {
|
||||
|
|
@ -494,23 +494,23 @@ entry(xmlNode *node, char *nodename, char *content)
|
|||
|
||||
/* The following three are for backward compatibility only */
|
||||
} else if (!strcasecmp(nodename, "show.windowSwitcher.core")) {
|
||||
rc.cycle_view_osd = get_bool(content);
|
||||
rc.window_switcher.show = get_bool(content);
|
||||
} else if (!strcasecmp(nodename, "preview.windowSwitcher.core")) {
|
||||
rc.cycle_preview_contents = get_bool(content);
|
||||
rc.window_switcher.preview = get_bool(content);
|
||||
} else if (!strcasecmp(nodename, "outlines.windowSwitcher.core")) {
|
||||
rc.cycle_preview_outlines = get_bool(content);
|
||||
rc.window_switcher.outlines = get_bool(content);
|
||||
|
||||
/* The following three are for backward compatibility only */
|
||||
} else if (!strcasecmp(nodename, "cycleViewOSD.core")) {
|
||||
rc.cycle_view_osd = get_bool(content);
|
||||
rc.window_switcher.show = get_bool(content);
|
||||
wlr_log(WLR_ERROR, "<cycleViewOSD> is deprecated."
|
||||
" Use <windowSwitcher show=\"\" />");
|
||||
} else if (!strcasecmp(nodename, "cycleViewPreview.core")) {
|
||||
rc.cycle_preview_contents = get_bool(content);
|
||||
rc.window_switcher.preview = get_bool(content);
|
||||
wlr_log(WLR_ERROR, "<cycleViewPreview> is deprecated."
|
||||
" Use <windowSwitcher preview=\"\" />");
|
||||
} else if (!strcasecmp(nodename, "cycleViewOutlines.core")) {
|
||||
rc.cycle_preview_outlines = get_bool(content);
|
||||
rc.window_switcher.outlines = get_bool(content);
|
||||
wlr_log(WLR_ERROR, "<cycleViewOutlines> is deprecated."
|
||||
" Use <windowSwitcher outlines=\"\" />");
|
||||
|
||||
|
|
@ -644,9 +644,11 @@ 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 = true;
|
||||
rc.cycle_preview_outlines = true;
|
||||
|
||||
rc.window_switcher.show = true;
|
||||
rc.window_switcher.preview = true;
|
||||
rc.window_switcher.outlines = true;
|
||||
|
||||
rc.workspace_config.popuptime = INT_MIN;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -444,7 +444,7 @@ osd_update(struct server *server)
|
|||
return;
|
||||
}
|
||||
|
||||
if (rc.cycle_view_osd) {
|
||||
if (rc.window_switcher.show) {
|
||||
/* Display the actual OSD */
|
||||
struct output *output;
|
||||
wl_list_for_each(output, &server->outputs, link) {
|
||||
|
|
@ -456,13 +456,13 @@ osd_update(struct server *server)
|
|||
}
|
||||
|
||||
/* Outline current window */
|
||||
if (rc.cycle_preview_outlines) {
|
||||
if (rc.window_switcher.outlines) {
|
||||
if (isfocusable(server->osd_state.cycle_view)) {
|
||||
osd_update_preview_outlines(server->osd_state.cycle_view);
|
||||
}
|
||||
}
|
||||
|
||||
if (rc.cycle_preview_contents) {
|
||||
if (rc.window_switcher.preview) {
|
||||
preview_cycled_view(server->osd_state.cycle_view);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue