*serverDecoration* over-rules any other setting for server-side window
decoration on first map.
+*<windowRules><windowRule skipTaskbar="">* [yes|no|default]
+ *skipTaskbar* removes window foreign-toplevel protocol handle so that
+ it does not appear in clients such as panels and taskbars using that
+ protocol.
+
+*<windowRules><windowRule skipWindowSwitcher="">* [yes|no|default]
+ *skipWindowSwitcher* removes window from the Window Switcher (alt-tab
+ on-screen-display)
+
## ENVIRONMENT VARIABLES
*XCURSOR_THEME* and *XCURSOR_SIZE* are supported to set cursor theme
struct wl_list actions;
enum property server_decoration;
+ enum property skip_taskbar;
+ enum property skip_window_switcher;
struct wl_list link; /* struct rcxml.window_rules */
};
/* Properties */
} else if (!strcasecmp(nodename, "serverDecoration")) {
set_property(content, ¤t_window_rule->server_decoration);
+ } else if (!strcasecmp(nodename, "skipTaskbar")) {
+ set_property(content, ¤t_window_rule->skip_taskbar);
+ } else if (!strcasecmp(nodename, "skipWindowSwitcher")) {
+ set_property(content, ¤t_window_rule->skip_window_switcher);
/* Actions */
} else if (!strcmp(nodename, "name.action")) {
#include "node.h"
#include "ssd.h"
#include "view.h"
+#include "window-rules.h"
#include "workspaces.h"
#include "xwayland.h"
continue;
}
view = node_view_from_node(node);
- if (isfocusable(view)) {
+
+ enum property skip = window_rules_get_property(view, "skipWindowSwitcher");
+ if (isfocusable(view) && skip != LAB_PROP_TRUE) {
return view;
}
} while (view != start_view);
#include "theme.h"
#include "node.h"
#include "view.h"
+#include "window-rules.h"
#include "workspaces.h"
#define OSD_ITEM_HEIGHT (20)
continue;
}
view = node_view_from_node(node);
- if (!isfocusable(view)) {
+ enum property skip = window_rules_get_property(view, "skipWindowSwitcher");
+ if (!isfocusable(view) || skip == LAB_PROP_TRUE) {
continue;
}
height += OSD_ITEM_HEIGHT;
continue;
}
struct view *view = node_view_from_node(node);
- if (!isfocusable(view)) {
+ enum property skip = window_rules_get_property(view, "skipWindowSwitcher");
+ if (!isfocusable(view) || skip == LAB_PROP_TRUE) {
continue;
}
if (!view->been_mapped) {
window_rules_apply(view, LAB_WINDOW_RULE_EVENT_ON_FIRST_MAP);
}
+
+ /*
+ * It's tempting to just never create the foreign-toplevel handle in the
+ * map handlers, but the app_id/title might not have been set at that
+ * point, so it's safer to process the property here
+ */
+ enum property ret = window_rules_get_property(view, "skipTaskbar");
+ if (ret == LAB_PROP_TRUE) {
+ if (view->toplevel.handle) {
+ wlr_foreign_toplevel_handle_v1_destroy(view->toplevel.handle);
+ }
+ }
+
+ wlr_log(WLR_DEBUG, "[map] identifier=%s, title=%s\n",
+ view_get_string_prop(view, "app_id"),
+ view_get_string_prop(view, "title"));
}
static bool
* for.
*/
if (view_matches_criteria(rule, view)) {
- if (!strcasecmp(property, "serverDecoration")) {
- if (rule->server_decoration) {
- return rule->server_decoration;
- }
+ if (rule->server_decoration
+ && !strcasecmp(property, "serverDecoration")) {
+ return rule->server_decoration;
+ }
+ if (rule->skip_taskbar
+ && !strcasecmp(property, "skipTaskbar")) {
+ return rule->skip_taskbar;
+ }
+ if (rule->skip_window_switcher
+ && !strcasecmp(property, "skipWindowSwitcher")) {
+ return rule->skip_window_switcher;
}
}
}