ui/motif/Grid.c

branch
newapi
changeset 407
8ea123dd89db
parent 406
0ebf9d7b23e8
child 408
b06e43f1edd4
--- a/ui/motif/Grid.c	Wed Dec 04 18:31:22 2024 +0100
+++ b/ui/motif/Grid.c	Wed Dec 04 20:36:16 2024 +0100
@@ -405,6 +405,29 @@
         req_height += rows[i].size;
     }
     
+    if(req_width > 0 && req_height > 0) {
+        Widget parent = w->core.parent;
+        Dimension rwidth = req_width;
+        Dimension rheight = req_height;
+        if(rwidth < w->core.width) {
+            //rwidth = w->core.width;
+        }
+        if(rheight < w->core.height) {
+            //rheight = w->core.height;
+        }
+        
+        if(!w->mywidget.sizerequest) {
+            Dimension actual_width, actual_height;
+            w->mywidget.sizerequest = TRUE;
+            XtMakeResizeRequest((Widget)w, req_width, req_height, &actual_width, &actual_height);
+            w->mywidget.sizerequest = FALSE;
+            //printf("size request: %d %d\n", (int)actual_width, (int)actual_height);
+        }
+        
+       
+        
+    }
+    
     int hexpand = 0;
     int width_diff = (int)w->core.width - req_width;
     int hexpand2 = 0;

mercurial