After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 762614 - Commit 51af704 gadget: Be careful in geometry calculations breaks virt-manager vnc widget painting
Commit 51af704 gadget: Be careful in geometry calculations breaks virt-manag...
Status: RESOLVED FIXED
Product: gtk+
Classification: Platform
Component: .General
3.19.x
Other Linux
: Normal normal
: ---
Assigned To: gtk-bugs
gtk-bugs
Depends on:
Blocks:
 
 
Reported: 2016-02-24 14:04 UTC by Yanko Kaneti
Modified: 2016-02-25 03:24 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Yanko Kaneti 2016-02-24 14:04:16 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,
Comment 1 Yanko Kaneti 2016-02-24 14:06:18 UTC
This was tested on master