GNOME Bugzilla – Bug 762614
Commit 51af704 gadget: Be careful in geometry calculations breaks virt-manager vnc widget painting
Last modified: 2016-02-25 03:24:00 UTC
virt-viewer's vnc console widget is not painted correctly after commit 51af704. The window just remains grey insted of showing the typical black virtual console. The widget itself seems to be working and reacts to input, just not visible. Just for a test I tried this workaround which seems work. diff --git a/gtk/gtkcssgadget.c b/gtk/gtkcssgadget.c index 5bb7cac..31d1471 100644 --- a/gtk/gtkcssgadget.c +++ b/gtk/gtkcssgadget.c @@ -755,7 +755,7 @@ gtk_css_gadget_draw (GtkCssGadget *gadget, contents_width = width - margin.left - margin.right - border.left - border.right - padding.left - padding.right; contents_height = height - margin.top - margin.bottom - border.top - border.bottom - padding.top - padding.bottom; - if (contents_width > 0 && contents_height > 0) + if (contents_width >= 0 && contents_height >= 0) draw_focus = GTK_CSS_GADGET_GET_CLASS (gadget)->draw (gadget, cr, contents_x, contents_y,
This was tested on master