Blob Blame History Raw
From a641a92e935a26bdaf104e76a324d533171aa7b4 Mon Sep 17 00:00:00 2001
From: Pavel Grunt <pgrunt@redhat.com>
Date: Mon, 27 Mar 2017 13:36:57 +0200
Subject: [PATCH spice-gtk 6/8] widget: Always call gtk_widget_show_all
To: spice-devel@lists.freedesktop.org

Since spice-gtk 0.32 SpiceDisplay widget internally has changed
from the GtkDrawingArea to a GtkContainer.

Per gtk_widget_show documentation:
 "Remember that you have to show the containers containing a widget,
  in addition to the widget itself, before it will appear onscreen."

Let's always call gtk_widget_show_all, not just for gtk+ >= 3.16
otherwise you may get a blackscreen with spice-gtk compiled against
an old gtk+ version.

Fixes:
https://bugs.freedesktop.org/show_bug.cgi?id=100251

Acked-by: Christophe Fergeau <cfergeau@redhat.com>
(cherry picked from commit 721dbe9926c0e35e462595346829d55d7820ea05)
---
 src/spice-widget.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/spice-widget.c b/src/spice-widget.c
index 06e332f..cc0a705 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -645,9 +645,9 @@ static void spice_display_init(SpiceDisplay *display)
                      "signal::realize", gl_area_realize, display,
                      NULL);
     gtk_stack_add_named(d->stack, area, "gl-area");
-    gtk_widget_show_all(widget);
 #endif
 #endif
+    gtk_widget_show_all(widget);
 
     g_signal_connect(display, "grab-broken-event", G_CALLBACK(grab_broken), NULL);
     g_signal_connect(display, "grab-notify", G_CALLBACK(grab_notify), NULL);
-- 
2.12.1