Don't use QPlatformNativeInterface for native window handle on Windows
This commit is contained in:
parent
33b7ac209e
commit
48ab88a9ca
|
@ -32,7 +32,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <QtWidgets/QApplication>
|
||||
#include <QtGui/QWindow>
|
||||
#include <QtGui/QScreen>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
#include <Shobjidl.h>
|
||||
#include <shellapi.h>
|
||||
|
@ -429,11 +428,7 @@ void MainWindow::updateIconCounters() {
|
|||
}
|
||||
|
||||
void MainWindow::initHook() {
|
||||
if (const auto native = QGuiApplication::platformNativeInterface()) {
|
||||
ps_hWnd = static_cast<HWND>(native->nativeResourceForWindow(
|
||||
QByteArrayLiteral("handle"),
|
||||
windowHandle()));
|
||||
}
|
||||
ps_hWnd = static_cast<HWND>(winId());
|
||||
if (!ps_hWnd) {
|
||||
return;
|
||||
}
|
||||
|
|
|
@ -31,7 +31,6 @@ https://github.com/telegramdesktop/tdesktop/blob/master/LEGAL
|
|||
#include <QtWidgets/QDesktopWidget>
|
||||
#include <QtGui/QDesktopServices>
|
||||
#include <QtGui/QWindow>
|
||||
#include <qpa/qplatformnativeinterface.h>
|
||||
|
||||
#include <Shobjidl.h>
|
||||
#include <ShObjIdl_core.h>
|
||||
|
|
Loading…
Reference in New Issue