mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
...of modifiers which are part of keybinds. This supports clients (for
example blender) that want to see modifier-release-events even if they are
part of a keybinds.
Most clients (including those using Qt and GTK) are setup to not see these
modifier release events and actually misbehave if they do. For example
Firefox shows the menu bar if alt is pressed and then released, whereas if
only pressed (because the release is absorbed) nothing happens. So, if
Firefox saw bound modifier-release-events it would show the menu bar every
time the window-switcher is used with alt-tab.
<windowRules>
<windowRule identifier="blender" wantAbsorbedModifierReleaseEvents="yes"/>
</windowRules>
Issue #1507
51 lines
1.1 KiB
C
51 lines
1.1 KiB
C
/* SPDX-License-Identifier: GPL-2.0-only */
|
|
#ifndef LABWC_WINDOW_RULES_H
|
|
#define LABWC_WINDOW_RULES_H
|
|
|
|
#include <stdbool.h>
|
|
#include <wayland-util.h>
|
|
|
|
enum window_rule_event {
|
|
LAB_WINDOW_RULE_EVENT_ON_FIRST_MAP = 0,
|
|
};
|
|
|
|
enum property {
|
|
LAB_PROP_UNSPECIFIED = 0,
|
|
LAB_PROP_UNSET,
|
|
LAB_PROP_FALSE,
|
|
LAB_PROP_TRUE,
|
|
};
|
|
|
|
/*
|
|
* 'identifier' represents:
|
|
* - 'app_id' for native Wayland windows
|
|
* - 'WM_CLASS' for XWayland clients
|
|
*/
|
|
struct window_rule {
|
|
char *identifier;
|
|
char *title;
|
|
int window_type;
|
|
char *sandbox_engine;
|
|
char *sandbox_app_id;
|
|
bool match_once;
|
|
|
|
enum window_rule_event event;
|
|
struct wl_list actions;
|
|
|
|
enum property server_decoration;
|
|
enum property skip_taskbar;
|
|
enum property skip_window_switcher;
|
|
enum property ignore_focus_request;
|
|
enum property ignore_configure_request;
|
|
enum property fixed_position;
|
|
enum property want_absorbed_modifier_release_events;
|
|
|
|
struct wl_list link; /* struct rcxml.window_rules */
|
|
};
|
|
|
|
struct view;
|
|
|
|
void window_rules_apply(struct view *view, enum window_rule_event event);
|
|
enum property window_rules_get_property(struct view *view, const char *property);
|
|
|
|
#endif /* LABWC_WINDOW_RULES_H */
|