fix: gate shortcut inhibition by session policy
This commit is contained in:
1 parent
7f92b6d634
commit
84ffa1f41c
2 files changed
+15
No files matched your search
@@ -53,6 +53,16 @@ FERESE_ENABLE_INPUT_METHOD=1 cargo run -p ferese
|
|||||||
|
|
||||||
`Ctrl+Alt+Escape` always releases an active client shortcut inhibitor.
|
`Ctrl+Alt+Escape` always releases an active client shortcut inhibitor.
|
||||||
|
|
||||||
|
Keyboard-shortcut inhibition is hidden unless a trusted VM or remote-desktop
|
||||||
|
session explicitly enables it:
|
||||||
|
|
||||||
|
```bash
|
||||||
|
FERESE_ENABLE_SHORTCUT_INHIBIT=1 cargo run -p ferese
|
||||||
|
```
|
||||||
|
|
||||||
|
The emergency `Ctrl+Alt+Escape` binding remains available while inhibition is
|
||||||
|
active.
|
||||||
|
|
||||||
Screen capture is hidden by default. A session that has already made an
|
Screen capture is hidden by default. A session that has already made an
|
||||||
explicit capture-policy decision can expose screencopy-v1 to its clients with:
|
explicit capture-policy decision can expose screencopy-v1 to its clients with:
|
||||||
|
|
||||||
|
|||||||
@@ -302,6 +302,11 @@ impl Ferese {
|
|||||||
InputMethodManagerState::new::<Self, _>(&display_handle, move |_| input_method_enabled);
|
InputMethodManagerState::new::<Self, _>(&display_handle, move |_| input_method_enabled);
|
||||||
let keyboard_shortcuts_inhibit_state =
|
let keyboard_shortcuts_inhibit_state =
|
||||||
KeyboardShortcutsInhibitState::new::<Self>(&display_handle);
|
KeyboardShortcutsInhibitState::new::<Self>(&display_handle);
|
||||||
|
let shortcut_inhibit_enabled =
|
||||||
|
std::env::var_os("FERESE_ENABLE_SHORTCUT_INHIBIT").is_some_and(|value| value == "1");
|
||||||
|
if !shortcut_inhibit_enabled {
|
||||||
|
display_handle.disable_global::<Self>(keyboard_shortcuts_inhibit_state.global());
|
||||||
|
}
|
||||||
let shm_state = ShmState::new::<Self>(&display_handle, Vec::new());
|
let shm_state = ShmState::new::<Self>(&display_handle, Vec::new());
|
||||||
let single_pixel_buffer_state = SinglePixelBufferState::new::<Self>(&display_handle);
|
let single_pixel_buffer_state = SinglePixelBufferState::new::<Self>(&display_handle);
|
||||||
let text_input_manager_state = TextInputManagerState::new::<Self>(&display_handle);
|
let text_input_manager_state = TextInputManagerState::new::<Self>(&display_handle);
|
||||||
|
|||||||
Reference in new issue
Block a user