[gnome-builder/wip/project-selector: 71/72] app: set a reasonable fallback if we get 0x0 back from screen



commit 28f14f8ce9353558a522afd9b6db5859f9d1bc84
Author: Christian Hergert <christian hergert me>
Date:   Tue Apr 7 11:49:53 2015 -0700

    app: set a reasonable fallback if we get 0x0 back from screen
    
    This can happen on Wayland on the first initialization. Bug #747471. So we
    will just add a quick fallback to ensure we don't end up at our smallest
    requisition size.

 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 bcd2245..affa680 100644
--- a/src/app/gb-application.c
+++ b/src/app/gb-application.c
@@ -55,6 +55,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]