Skip to content

Commit fcc60cd

Browse files
committed
gtk_display: Fix keyboard focus not being grabbed
This fixes a bug where keyboard wouldn't work in the VM until the user interacted with the window by mouse/touch (making it fullscreen). Signed-off-by: Matej Hrica <[email protected]>
1 parent 50e792c commit fcc60cd

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

examples/krun_gtk_display/src/display_worker.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -393,6 +393,7 @@ impl ScanoutWindow {
393393

394394
if let Some(keyboard_event_tx) = keyboard_event_tx {
395395
picture.set_focusable(true);
396+
picture.grab_focus();
396397
attach_keyboard(keyboard_event_tx, &picture);
397398
}
398399
attach_per_display_inputs(&picture, &overlay, per_display_inputs);

0 commit comments

Comments
 (0)