Send KeyboardEventVariant::Enter on keyboard enter
`cosmic-osd` expected this event, but it wasn't being sent. This isn't hard to fix, unless there's some non-obvious issues that this was commented to avoid (that is still applicable).
This commit is contained in:
parent
83910ff5b0
commit
db8e74b7a3
1 changed files with 7 additions and 6 deletions
|
|
@ -20,7 +20,7 @@ impl KeyboardHandler for SctkState {
|
||||||
_keysyms: &[Keysym],
|
_keysyms: &[Keysym],
|
||||||
) {
|
) {
|
||||||
self.request_redraw(surface);
|
self.request_redraw(surface);
|
||||||
let (i, mut is_active, _seat) = {
|
let (i, mut is_active, seat) = {
|
||||||
let (i, is_active, my_seat) =
|
let (i, is_active, my_seat) =
|
||||||
match self.seats.iter_mut().enumerate().find_map(|(i, s)| {
|
match self.seats.iter_mut().enumerate().find_map(|(i, s)| {
|
||||||
if s.kbd.as_ref() == Some(keyboard) {
|
if s.kbd.as_ref() == Some(keyboard) {
|
||||||
|
|
@ -56,11 +56,12 @@ impl KeyboardHandler for SctkState {
|
||||||
id,
|
id,
|
||||||
winit::event::WindowEvent::Focused(true),
|
winit::event::WindowEvent::Focused(true),
|
||||||
));
|
));
|
||||||
// self.sctk_events.push(SctkEvent::KeyboardEvent {
|
self.sctk_events.push(SctkEvent::KeyboardEvent {
|
||||||
// variant: KeyboardEventVariant::Enter(surface.clone()),
|
variant: KeyboardEventVariant::Enter(surface.clone()),
|
||||||
// kbd_id: keyboard.clone(),
|
kbd_id: keyboard.clone(),
|
||||||
// seat_id: seat,
|
seat_id: seat,
|
||||||
// })
|
surface: surface.clone(),
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue