]> git.proxmox.com Git - mirror_qemu.git/commit - ui/gtk.c
ui/gtk: Restore keyboard focus after Page change
authorJohn Snow <jsnow@redhat.com>
Tue, 8 Jul 2014 18:28:57 +0000 (14:28 -0400)
committerGerd Hoffmann <kraxel@redhat.com>
Fri, 11 Jul 2014 08:44:00 +0000 (10:44 +0200)
commite72b59fa93b68635f42cdb1b1134f60dd4040d7b
treed905f0c374d62032c30045b4c8fe2f7b043b7b25
parent9e99c5fd7060267a0331d900e73fdb36047bfe0c
ui/gtk: Restore keyboard focus after Page change

(Resending for correct email addresses via MAINTAINERS ...)

In the GTK UI, after changing focus to the qemu monitor Notebook Page,
when restoring focus to the virtual machine page, the keyboard focus is lost
to a hidden GTK widget. Focus can only be restored to the virtual machine by
pressing "tab" or any of the four directional arrow keys.

Clicking in the window or grabbing/ungrabbing input does not restore keyboard
focus to the child widget.

This patch adjusts the Notebook page switching callback to automatically
steal keyboard focus on the Page switch event, so that keyboard input
does not appear to break or disappear after tabbing to the QEMU monitor.

Signed-off-by: John Snow <jsnow@redhat.com>
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
ui/gtk.c