Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deny shortcut inhibit #2051

Merged
merged 1 commit into from
Dec 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions metadata/shortcuts-inhibit.xml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,12 @@
<default>none</default>
</option>

<option name="ignore_views" type="string">
<_short>Ignore views</_short>
<_long>Restrict matched views from activating shortcuts inhibit.</_long>
<default>none</default>
</option>

<option name="break_grab" type="key">
<_short>Break current inhibitor</_short>
<_long>A keybinding to remove the currently active inhibitor temporary.</_long>
Expand Down
7 changes: 7 additions & 0 deletions plugins/protocols/shortcuts-inhibit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand All @@ -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"};
Expand Down