diff --git a/distrho/DistrhoUI.hpp b/distrho/DistrhoUI.hpp index b5e44e49..e33a4ca4 100644 --- a/distrho/DistrhoUI.hpp +++ b/distrho/DistrhoUI.hpp @@ -67,12 +67,14 @@ public: */ bool isUserResizable() const noexcept; +#ifdef HAVE_DGL /** Set geometry constraints for the UI when resized by the user, and optionally scale UI automatically. @see Window::setGeometryConstraints(uint,uint,bool) @see Window::setScaling(double) */ void setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale = false); +#endif /* -------------------------------------------------------------------------------------------------------- * Host state */ diff --git a/distrho/src/DistrhoPluginVST.cpp b/distrho/src/DistrhoPluginVST.cpp index 2d05b782..16472a20 100644 --- a/distrho/src/DistrhoPluginVST.cpp +++ b/distrho/src/DistrhoPluginVST.cpp @@ -328,7 +328,7 @@ protected: void setSize(const uint width, const uint height) { - fUI.setWindowSize(width, height); + fUI.setWindowSize(width, height, false); hostCallback(audioMasterSizeWindow, width, height); } diff --git a/distrho/src/DistrhoUI.cpp b/distrho/src/DistrhoUI.cpp index c590ce9b..89162d67 100644 --- a/distrho/src/DistrhoUI.cpp +++ b/distrho/src/DistrhoUI.cpp @@ -62,6 +62,7 @@ bool UI::isUserResizable() const noexcept return pData->userResizable; } +#ifdef HAVE_DGL void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRatio, bool automaticallyScale) { DISTRHO_SAFE_ASSERT_RETURN(minWidth > 0,); @@ -72,7 +73,9 @@ void UI::setGeometryConstraints(uint minWidth, uint minHeight, bool keepAspectRa pData->minHeight = minHeight; getParentWindow().setGeometryConstraints(minWidth, minHeight, keepAspectRatio); + } +#endif /* ------------------------------------------------------------------------------------------------------------ * Host state */ diff --git a/distrho/src/DistrhoUILV2.cpp b/distrho/src/DistrhoUILV2.cpp index 79c7e212..367e9d2c 100644 --- a/distrho/src/DistrhoUILV2.cpp +++ b/distrho/src/DistrhoUILV2.cpp @@ -292,7 +292,7 @@ protected: void setSize(const uint width, const uint height) { - fUI.setWindowSize(width, height); + fUI.setWindowSize(width, height, false); if (fUiResize != nullptr && ! fWinIdWasNull) fUiResize->ui_resize(fUiResize->handle, width, height);