summaryrefslogtreecommitdiffstats
path: root/src/virt-viewer-notebook.c
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@gmail.com>2012-02-06 12:28:05 +0000
committerDaniel P. Berrange <berrange@redhat.com>2012-02-06 12:28:05 +0000
commit0e6f0847d8ff701d6047db5ebcf19c1918f1d6c8 (patch)
tree289912962c637b8b7a81083b09bde7f1f3c60378 /src/virt-viewer-notebook.c
parentd6794516590984cc6c40a30acba1f077bb44ab16 (diff)
downloadvirt-viewer-0e6f0847d8ff701d6047db5ebcf19c1918f1d6c8.tar.gz
virt-viewer-0e6f0847d8ff701d6047db5ebcf19c1918f1d6c8.tar.xz
virt-viewer-0e6f0847d8ff701d6047db5ebcf19c1918f1d6c8.zip
Grab the focus when showing the display
Override the grab_focus() method in the display class. Since both VNC and Spice displays are the direct child, let's just grab the child. It can be that this behaviour need to be overriden if Spice or VNC display become more complex (using sub-childs or different objects)
Diffstat (limited to 'src/virt-viewer-notebook.c')
-rw-r--r--src/virt-viewer-notebook.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/virt-viewer-notebook.c b/src/virt-viewer-notebook.c
index fa28593..b4e09ec 100644
--- a/src/virt-viewer-notebook.c
+++ b/src/virt-viewer-notebook.c
@@ -127,6 +127,7 @@ virt_viewer_notebook_show_display(VirtViewerNotebook *self)
display = gtk_notebook_get_nth_page(GTK_NOTEBOOK(self), 1);
g_warn_if_fail(display != NULL);
+ gtk_widget_grab_focus(display);
gtk_notebook_set_current_page(GTK_NOTEBOOK(self), 1);
gtk_widget_show_all(GTK_WIDGET(self));