summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-Andre Lureau <marcandre.lureau@redhat.com>2012-03-22 00:22:37 +0100
committerMarc-André Lureau <marcandre.lureau@gmail.com>2012-03-22 00:24:47 +0100
commit336e71534b0ff6a58a284c3ecd97debb8b59621f (patch)
tree2fff9fa0b1b6a7e07cd183a9fc2e6da992ae0681
parentdf1fbf1e8d0b4f56bda6dc4cf40379d5af30d128 (diff)
Do not warn if the display is shown and not ready
Lower warning message to debug level. There are various racy ways it ends up calling show_display although the display is not yet ready. This is not such a big problem, although it would be nice to handle this case better
-rw-r--r--src/virt-viewer-notebook.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/virt-viewer-notebook.c b/src/virt-viewer-notebook.c
index 0249021..09e8ec4 100644
--- a/src/virt-viewer-notebook.c
+++ b/src/virt-viewer-notebook.c
@@ -129,8 +129,10 @@ virt_viewer_notebook_show_display(VirtViewerNotebook *self)
g_return_if_fail(VIRT_VIEWER_IS_NOTEBOOK(self));
display = gtk_notebook_get_nth_page(GTK_NOTEBOOK(self), 1);
- g_warn_if_fail(display != NULL);
- gtk_widget_grab_focus(display);
+ if (display == NULL)
+ DEBUG_LOG("FIXME: showing display although it's not ready yet");
+ else
+ gtk_widget_grab_focus(display);
gtk_notebook_set_current_page(GTK_NOTEBOOK(self), 1);
gtk_widget_show_all(GTK_WIDGET(self));