mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
window-rules: add ignoreFocusRequest property
This allows to reject focus requests from specific applications.
This commit is contained in:
parent
272222e3c9
commit
bb235337d8
6 changed files with 21 additions and 0 deletions
|
|
@ -285,6 +285,12 @@ handle_request_activate(struct wl_listener *listener, void *data)
|
|||
struct xwayland_view *xwayland_view =
|
||||
wl_container_of(listener, xwayland_view, request_activate);
|
||||
struct view *view = &xwayland_view->base;
|
||||
|
||||
if (window_rules_get_property(view, "ignoreFocusRequest") == LAB_PROP_TRUE) {
|
||||
wlr_log(WLR_INFO, "Ignoring focus request due to window rule configuration");
|
||||
return;
|
||||
}
|
||||
|
||||
desktop_focus_and_activate_view(&view->server->seat, view);
|
||||
view_move_to_front(view);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue