input: Treat pointer-shortcuts as potentially inhibited
This commit is contained in:
parent
15a6425836
commit
07bd8bedef
1 changed files with 13 additions and 1 deletions
|
|
@ -615,6 +615,16 @@ impl State {
|
||||||
};
|
};
|
||||||
self.common.idle_notifier_state.notify_activity(&seat);
|
self.common.idle_notifier_state.notify_activity(&seat);
|
||||||
|
|
||||||
|
let current_focus = seat.get_keyboard().unwrap().current_focus();
|
||||||
|
let shortcuts_inhibited = current_focus.is_some_and(|f| {
|
||||||
|
f.wl_surface()
|
||||||
|
.and_then(|surface| {
|
||||||
|
seat.keyboard_shortcuts_inhibitor_for_surface(&surface)
|
||||||
|
.map(|inhibitor| inhibitor.is_active())
|
||||||
|
})
|
||||||
|
.unwrap_or(false)
|
||||||
|
});
|
||||||
|
|
||||||
let serial = SERIAL_COUNTER.next_serial();
|
let serial = SERIAL_COUNTER.next_serial();
|
||||||
let button = event.button_code();
|
let button = event.button_code();
|
||||||
let mut pass_event = !seat.supressed_buttons().remove(button);
|
let mut pass_event = !seat.supressed_buttons().remove(button);
|
||||||
|
|
@ -633,7 +643,9 @@ impl State {
|
||||||
// Don't check override redirect windows, because we don't set keyboard focus to them explicitly.
|
// Don't check override redirect windows, because we don't set keyboard focus to them explicitly.
|
||||||
// These cases are handled by the XwaylandKeyboardGrab.
|
// These cases are handled by the XwaylandKeyboardGrab.
|
||||||
if let Some(target) = shell.element_under(global_position, &output) {
|
if let Some(target) = shell.element_under(global_position, &output) {
|
||||||
if seat.get_keyboard().unwrap().modifier_state().logo {
|
if seat.get_keyboard().unwrap().modifier_state().logo
|
||||||
|
&& !shortcuts_inhibited
|
||||||
|
{
|
||||||
if let Some(surface) = target.toplevel().map(Cow::into_owned) {
|
if let Some(surface) = target.toplevel().map(Cow::into_owned) {
|
||||||
let seat_clone = seat.clone();
|
let seat_clone = seat.clone();
|
||||||
let mouse_button = PointerButtonEvent::button(&event);
|
let mouse_button = PointerButtonEvent::button(&event);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue