summaryrefslogtreecommitdiff
path: root/dgl/src
diff options
context:
space:
mode:
authorDamien Zammit <damien@zamaudio.com>2018-09-28 15:15:07 +1000
committerDamien Zammit <damien@zamaudio.com>2018-09-28 15:19:06 +1000
commitb0e9bc5956484008b2278e05aa89f24ba97b0cd7 (patch)
treee6d3369ae53e7c1520075bff9412d06ef061e9d5 /dgl/src
parent6d35b690e5399ceaf52b42443b0b3a94587122ac (diff)
WIP make resizeable always fixed aspect ratio on linuxpugl-aspect-linux
Diffstat (limited to 'dgl/src')
-rw-r--r--dgl/src/pugl/pugl_x11.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/dgl/src/pugl/pugl_x11.c b/dgl/src/pugl/pugl_x11.c
index 22432488..c15bbeff 100644
--- a/dgl/src/pugl/pugl_x11.c
+++ b/dgl/src/pugl/pugl_x11.c
@@ -296,9 +296,13 @@ puglCreateWindow(PuglView* view, const char* title)
sizeHints.max_height = view->height;
XSetNormalHints(impl->display, impl->win, &sizeHints);
} else if (view->min_width > 0 && view->min_height > 0) {
- sizeHints.flags = PMinSize;
+ sizeHints.flags = PMinSize|PAspect;
sizeHints.min_width = view->min_width;
sizeHints.min_height = view->min_height;
+ sizeHints.min_aspect.x = view->min_width;
+ sizeHints.min_aspect.y = view->min_height;
+ sizeHints.max_aspect.x = view->min_width;
+ sizeHints.max_aspect.y = view->min_height;
XSetNormalHints(impl->display, impl->win, &sizeHints);
}