From ef2365e81adb3bbd9110f94aa144e368f3156f22 Mon Sep 17 00:00:00 2001 From: fourtf Date: Mon, 25 Jun 2018 12:52:07 +0200 Subject: [PATCH] small fix and increased version number to 2.0.4 --- src/version.hpp | 2 +- src/widgets/basewindow.cpp | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/version.hpp b/src/version.hpp index 6be974663..2b1b51b39 100644 --- a/src/version.hpp +++ b/src/version.hpp @@ -2,7 +2,7 @@ #include -#define CHATTERINO_VERSION "2.0.3" +#define CHATTERINO_VERSION "2.0.4" #if defined(Q_OS_WIN) #define CHATTERINO_OS "win" diff --git a/src/widgets/basewindow.cpp b/src/widgets/basewindow.cpp index 064fbb23e..18ef0e2a6 100644 --- a/src/widgets/basewindow.cpp +++ b/src/widgets/basewindow.cpp @@ -448,10 +448,10 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, long *r case WM_SHOWWINDOW: { // if (IsWindows8Point1OrGreater()) { - HINSTANCE shcore = LoadLibrary(L"Shcore.dll"); + static HINSTANCE shcore = LoadLibrary(L"Shcore.dll"); if (shcore != nullptr) { if (auto getDpiForMonitor = - (GetDpiForMonitor_)GetProcAddress(shcore, "GetDpiForMonitor")) { + GetDpiForMonitor_(GetProcAddress(shcore, "GetDpiForMonitor"))) { HMONITOR monitor = MonitorFromWindow(msg->hwnd, MONITOR_DEFAULTTONEAREST); UINT xScale, yScale; @@ -466,6 +466,7 @@ bool BaseWindow::nativeEvent(const QByteArray &eventType, void *message, long *r this->updateScale(); } } + return true; } case WM_NCCALCSIZE: {