</windowSwitcher>
```
-*<windowSwitcher show="" style="" preview="" outlines="" allWorkspaces="">*
+*<windowSwitcher show="" style="" preview="" outlines="" allWorkspaces="" unshade="">*
*show* [yes|no] Draw the OnScreenDisplay when switching between
windows. Default is yes.
they are on. Default no (that is only windows on the current workspace
are shown).
+ *unshade* [yes|no] Temporarily unshade windows when switching between
+ them and permanently unshade on the final selection. Default is yes.
+
*<windowSwitcher><fields><field content="" width="%">*
Define window switcher fields when using *<windowSwitcher style="classic" />*.
</font>
</theme>
- <windowSwitcher show="yes" style="classic" preview="yes" outlines="yes" allWorkspaces="no">
+ <windowSwitcher show="yes" style="classic" preview="yes"
+ outlines="yes" allWorkspaces="no" unshade="yes">
<fields>
<field content="icon" width="5%" />
<field content="desktop_entry_name" width="30%" />
bool show;
bool preview;
bool outlines;
+ bool unshade;
enum lab_view_criteria criteria;
struct wl_list fields; /* struct window_switcher_field.link */
enum window_switcher_style style;
/* Set when in cycle (alt-tab) mode */
struct osd_state {
struct view *cycle_view;
+ bool preview_was_shaded;
bool preview_was_enabled;
struct wlr_scene_node *preview_node;
struct wlr_scene_tree *preview_parent;
rc.window_switcher.criteria &=
~LAB_VIEW_CRITERIA_CURRENT_WORKSPACE;
}
+ } else if (!strcasecmp(nodename, "unshade.windowSwitcher")) {
+ set_bool(content, &rc.window_switcher.unshade);
/* Remove this long term - just a friendly warning for now */
} else if (strstr(nodename, "windowswitcher.core")) {
rc.window_switcher.style = WINDOW_SWITCHER_CLASSIC;
rc.window_switcher.preview = true;
rc.window_switcher.outlines = true;
+ rc.window_switcher.unshade = true;
rc.window_switcher.criteria = LAB_VIEW_CRITERIA_CURRENT_WORKSPACE
| LAB_VIEW_CRITERIA_ROOT_TOPLEVEL
| LAB_VIEW_CRITERIA_NO_SKIP_WINDOW_SWITCHER;
/* FIXME: osd_finish() transiently sets focus to the old surface */
osd_finish(server);
/* Note that server->osd_state.cycle_view is cleared at this point */
+ if (rc.window_switcher.unshade) {
+ view_set_shade(cycle_view, false);
+ }
desktop_focus_view(cycle_view, /*raise*/ true);
}
#include "common/scene-helpers.h"
#include "config/rcxml.h"
#include "labwc.h"
+#include "node.h"
#include "output.h"
#include "scaled-buffer/scaled-font-buffer.h"
#include "scaled-buffer/scaled-icon-buffer.h"
if (!osd_state->preview_was_enabled) {
wlr_scene_node_set_enabled(osd_state->preview_node, false);
}
+ if (osd_state->preview_was_shaded) {
+ struct view *view = node_view_from_node(osd_state->preview_node);
+ view_set_shade(view, true);
+ }
osd_state->preview_node = NULL;
osd_state->preview_parent = NULL;
osd_state->preview_anchor = NULL;
+ osd_state->preview_was_shaded = false;
}
}
server->osd_state.preview_node = NULL;
server->osd_state.preview_anchor = NULL;
server->osd_state.cycle_view = NULL;
+ server->osd_state.preview_was_shaded = false;
destroy_osd_scenes(server);
if (!osd_state->preview_was_enabled) {
wlr_scene_node_set_enabled(osd_state->preview_node, true);
}
+ if (rc.window_switcher.unshade && view->shaded) {
+ view_set_shade(view, false);
+ osd_state->preview_was_shaded = true;
+ }
/*
* FIXME: This abuses an implementation detail of the always-on-top tree.
}
}
+ if (rc.window_switcher.preview) {
+ preview_cycled_view(server->osd_state.cycle_view);
+ }
+
/* Outline current window */
if (rc.window_switcher.outlines) {
if (view_is_focusable(server->osd_state.cycle_view)) {
}
}
- if (rc.window_switcher.preview) {
- preview_cycled_view(server->osd_state.cycle_view);
- }
out:
wl_array_release(&views);
}