summaryrefslogtreecommitdiff
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
parent6d35b690e5399ceaf52b42443b0b3a94587122ac (diff)
WIP make resizeable always fixed aspect ratio on linuxpugl-aspect-linux
-rw-r--r--dgl/src/pugl/pugl_x11.c6
-rw-r--r--distrho/src/DistrhoUIInternal.hpp2
2 files changed, 6 insertions, 2 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);
}
diff --git a/distrho/src/DistrhoUIInternal.hpp b/distrho/src/DistrhoUIInternal.hpp
index 8a045a93..8a01be6f 100644
--- a/distrho/src/DistrhoUIInternal.hpp
+++ b/distrho/src/DistrhoUIInternal.hpp
@@ -157,7 +157,7 @@ public:
DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,);
// set window size
- setResizable(false);
+ setResizable(true);
setSize(fUI->getWidth(), fUI->getHeight());
}