From 310edfd81c3ffbee0b1b8ba90061ea35392f0cb6 Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Fri, 20 Oct 2017 17:42:35 +0200 Subject: Fix missing return in createWindow --- plugintest.cc | 10 +++++++++- plugintest.h | 2 +- 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; -- cgit v1.2.3