[gnome-builder] app: add fallback size for default geometry



commit 22a03744b22272a1c80977cfa9ef27a548e10229
Author: Christian Hergert <christian hergert me>
Date:   Tue Apr 7 23:57:42 2015 -0700

    app: add fallback size for default geometry
    
    On some systems (wayland) we can get a width/height of zero. But filed
    with Gtk+, but we can wor around it for now.

 src/app/gb-application.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)
---
diff --git a/src/app/gb-application.c b/src/app/gb-application.c
index 3d1bf71..566b049 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -53,6 +53,12 @@ get_default_size (GtkRequisition *req)
 
   req->width = rect.width * 0.75;
   req->height = rect.height * 0.75;
+
+  if ((req->width == 0) || (req->height == 0))
+    {
+      req->width = 1080;
+      req->height = 675;
+    }
 }
 
 static void


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