[Spice-commits] gtk/spice-widget.c

Pavel Grunt pgrunt at kemper.freedesktop.org
Mon Feb 16 00:53:36 PST 2015


 gtk/spice-widget.c |    3 +++
 1 file changed, 3 insertions(+)

New commits:
commit 456e3e7519373e350fd94373b3c98ad51f3e71a4
Author: Pavel Grunt <pgrunt at redhat.com>
Date:   Sun Feb 15 19:42:13 2015 +0100

    widget: Do not draw cursor if widget is not realized
    
    Silences the runtime warning in virt-viewer and gnome-boxes (bgo#744432):
    Gtk-CRITICAL **: gtk_widget_queue_draw_area: assertion 'width >= 0' failed

diff --git a/gtk/spice-widget.c b/gtk/spice-widget.c
index 1f7008a..f5e8aab 100644
--- a/gtk/spice-widget.c
+++ b/gtk/spice-widget.c
@@ -2341,6 +2341,9 @@ static void cursor_invalidate(SpiceDisplay *display)
     double s;
     int x, y;
 
+    if (!gtk_widget_get_realized (GTK_WIDGET(display)))
+        return;
+
     if (d->mouse_pixbuf == NULL)
         return;
 


More information about the Spice-commits mailing list