[PATCH spice-gtk] widget: Do not draw cursor if widget is not realized

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Silences the runtime warning in virt-viewer and gnome-boxes (bgo#744432):
Gtk-CRITICAL **: gtk_widget_queue_draw_area: assertion 'width >= 0' failed
---
 gtk/spice-widget.c | 3 +++
 1 file changed, 3 insertions(+)

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;
 
-- 
2.3.0

_______________________________________________
Spice-devel mailing list
Spice-devel@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/spice-devel





[Index of Archives]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [ECOS]     [Asterisk Internet PBX]     [Linux API]     [Monitors]