diff --git a/chatterino.pro b/chatterino.pro index ae9619853..b1acd2b09 100644 --- a/chatterino.pro +++ b/chatterino.pro @@ -316,7 +316,6 @@ HEADERS += \ src/util/Helpers.hpp \ src/util/IrcHelpers.hpp \ src/util/LayoutCreator.hpp \ - src/util/NativeEventHelper.hpp \ src/util/PostToThread.hpp \ src/util/QstringHash.hpp \ src/util/RapidjsonHelpers.hpp \ diff --git a/src/main.cpp b/src/main.cpp index 9748fdebc..b3965928c 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -14,10 +14,6 @@ #include #include -#ifdef USEWINSDK -#include "util/NativeEventHelper.hpp" -#endif - #include #include diff --git a/src/util/NativeEventHelper.hpp b/src/util/NativeEventHelper.hpp deleted file mode 100644 index b9b0522a2..000000000 --- a/src/util/NativeEventHelper.hpp +++ /dev/null @@ -1,55 +0,0 @@ -#pragma once - -#ifdef USEWINSDK -#include -#include - -#include -#include - -namespace chatterino { - -// static boost::optional getWindowDpi(quintptr ptr) -//{ -// typedef UINT(WINAPI * GetDpiForWindow)(HWND); -// QLibrary user32("user32.dll", 0); - -// GetDpiForWindow getDpiForWindow = (GetDpiForWindow)user32.resolve("GetDpiForWindow"); - -// if (getDpiForWindow) { -// UINT value = getDpiForWindow((HWND)ptr); - -// return value == 0 ? boost::none : boost::optional(value); -// } - -// return boost::none; -//} - -//#ifdef USEWINSDK -// class DpiNativeEventFilter : public QAbstractNativeEventFilter -//{ -// public: -// bool nativeEventFilter(const QByteArray &eventType, void *message, long *result) override -// { -// // MSG *msg = reinterpret_cast(message); - -// // if (msg->message == WM_NCCREATE) { -// // QLibrary user32("user32.dll", 0); -// // { -// // typedef BOOL(WINAPI * EnableNonClientDpiScaling)(HWND); - -// // EnableNonClientDpiScaling enableNonClientDpiScaling = -// // (EnableNonClientDpiScaling)user32.resolve("EnableNonClientDpiScaling"); - -// // if (enableNonClientDpiScaling) -// // enableNonClientDpiScaling(msg->hwnd); -// // } -// // } -// return false; -// } -//}; -//#endif - -} // namespace chatterino - -#endif