summaryrefslogtreecommitdiff
path: root/distrho/src/DistrhoUIInternal.hpp
diff options
context:
space:
mode:
authorfalkTX <falktx@gmail.com>2014-08-17 21:55:24 +0100
committerfalkTX <falktx@gmail.com>2014-08-17 21:55:24 +0100
commitc9cd0b1a1f70354f4e7dcc22cdf8da4e1d60758d (patch)
treec512b64bc638c67d174c35c545bedfc21ae29f24 /distrho/src/DistrhoUIInternal.hpp
parent73641904f7e63ad46f5d936b40631234de84f2ed (diff)
NTK UIs seem to be working
Diffstat (limited to 'distrho/src/DistrhoUIInternal.hpp')
-rw-r--r--distrho/src/DistrhoUIInternal.hpp14
1 files changed, 8 insertions, 6 deletions
diff --git a/distrho/src/DistrhoUIInternal.hpp b/distrho/src/DistrhoUIInternal.hpp
index 1eaca647..dd114918 100644
--- a/distrho/src/DistrhoUIInternal.hpp
+++ b/distrho/src/DistrhoUIInternal.hpp
@@ -157,17 +157,15 @@ public:
{
DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,);
-#if ! DISTRHO_UI_USE_NTK
const int width = fUI->d_getWidth();
const int height = fUI->d_getHeight();
// set widget size
fUI->setSize(width, height);
- // set this window size
+ // set window size
setResizable(false);
setSize(width, height);
-#endif
}
~UIExporterWindow()
@@ -185,8 +183,14 @@ public:
return fIsReady;
}
-#if ! DISTRHO_UI_USE_NTK
protected:
+#if DISTRHO_UI_USE_NTK
+ void resize(int x, int y, int width, int height) override
+ {
+ UIWindow::resize(x, y, width, height);
+ fIsReady = true;
+ }
+#else
void onReshape(int width, int height) override
{
DISTRHO_SAFE_ASSERT_RETURN(fUI != nullptr,);
@@ -292,7 +296,6 @@ public:
}
#endif
-#if ! DISTRHO_UI_USE_NTK
// -------------------------------------------------------------------
void exec(IdleCallback* const cb)
@@ -355,7 +358,6 @@ public:
return ! glApp.isQuiting();
}
-#endif
void setSampleRate(const double sampleRate, const bool doCallback = false)
{