summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2017-10-20 17:42:35 +0200
committerBent Bisballe Nyeng <deva@aasimon.org>2017-10-20 17:42:35 +0200
commit310edfd81c3ffbee0b1b8ba90061ea35392f0cb6 (patch)
tree18a80976db390270fc01142fb2f8d41a01241a3f
parent36894382ff965c3751fdedb18b452d1329d3a82d (diff)
Fix missing return in createWindow
-rw-r--r--plugintest.cc10
-rw-r--r--plugintest.h2
2 files changed, 10 insertions, 2 deletions
diff --git a/plugintest.cc b/plugintest.cc
index cbe34fe..b485400 100644
--- a/plugintest.cc
+++ b/plugintest.cc
@@ -248,8 +248,10 @@ LRESULT CALLBACK PluginTest::wndProc(HWND hwnd, UINT iMsg,
}
#endif // defined(WIN32)
-void PluginTest::createWindow(void *parent)
+void* PluginTest::createWindow(void *parent)
{
+ void* window = nullptr;
+
#if defined(X11)
xDisplay = XOpenDisplay(nullptr);
@@ -261,6 +263,8 @@ void PluginTest::createWindow(void *parent)
XSelectInput(xDisplay, xWindow,
ExposureMask | KeyPressMask | PointerMotionMask);
+
+ window = (void*)xWindow;
#endif // defined(X11)
#if defined(WIN32)
@@ -292,10 +296,14 @@ void PluginTest::createWindow(void *parent)
SetWindowLongPtr(hwnd, GWLP_USERDATA, (LONG_PTR)this);
+ window = (void*)hwnd;
+
#endif // defined(WIN32)
resizeWindow(100, 100);
onShowWindow();
+
+ return window;
}
void PluginTest::onDestroyWindow()
diff --git a/plugintest.h b/plugintest.h
index 6d33767..f2bf8d5 100644
--- a/plugintest.h
+++ b/plugintest.h
@@ -98,7 +98,7 @@ public:
// GUI
//
bool hasGUI() override;
- void createWindow(void *parent) override;
+ void* createWindow(void *parent) override;
void onDestroyWindow() override;
void onShowWindow() override;
void onHideWindow() override;