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

Send KeyboardEventVariant::Enter on keyboard enter #195

Merged
merged 1 commit into from
Nov 19, 2024
Merged
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
13 changes: 7 additions & 6 deletions winit/src/platform_specific/wayland/handlers/seat/keyboard.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ impl KeyboardHandler for SctkState {
_keysyms: &[Keysym],
) {
self.request_redraw(surface);
let (i, mut is_active, _seat) = {
let (i, mut is_active, seat) = {
let (i, is_active, my_seat) =
match self.seats.iter_mut().enumerate().find_map(|(i, s)| {
if s.kbd.as_ref() == Some(keyboard) {
Expand Down Expand Up @@ -55,11 +55,12 @@ impl KeyboardHandler for SctkState {
id,
winit::event::WindowEvent::Focused(true),
));
// self.sctk_events.push(SctkEvent::KeyboardEvent {
// variant: KeyboardEventVariant::Enter(surface.clone()),
// kbd_id: keyboard.clone(),
// seat_id: seat,
// })
self.sctk_events.push(SctkEvent::KeyboardEvent {
variant: KeyboardEventVariant::Enter(surface.clone()),
kbd_id: keyboard.clone(),
seat_id: seat,
surface: surface.clone(),
});
}
}

Expand Down
Loading