diff --git a/metadata/shortcuts-inhibit.xml b/metadata/shortcuts-inhibit.xml index b113816a8..773b67ba1 100644 --- a/metadata/shortcuts-inhibit.xml +++ b/metadata/shortcuts-inhibit.xml @@ -11,6 +11,12 @@ none + + <_short>Ignore views + <_long>Restrict matched views from activating shortcuts inhibit. + none + + <_short>Break current inhibitor <_long>A keybinding to remove the currently active inhibitor temporary. diff --git a/plugins/protocols/shortcuts-inhibit.cpp b/plugins/protocols/shortcuts-inhibit.cpp index a2c2a5234..a4df40095 100644 --- a/plugins/protocols/shortcuts-inhibit.cpp +++ b/plugins/protocols/shortcuts-inhibit.cpp @@ -64,6 +64,12 @@ class wayfire_shortcuts_inhibit : public wf::plugin_interface_t } deactivate_for_surface(last_focus); + + if (ignore_views.matches(focus_view)) + { + return; + } + activate_for_surface(new_focus); } @@ -73,6 +79,7 @@ class wayfire_shortcuts_inhibit : public wf::plugin_interface_t } private: + wf::view_matcher_t ignore_views{"shortcuts-inhibit/ignore_views"}; wlr_keyboard_shortcuts_inhibit_manager_v1 *inhibit_manager; wf::wl_listener_wrapper keyboard_inhibit_new; wf::view_matcher_t inhibit_by_default{"shortcuts-inhibit/inhibit_by_default"};