Use winId to get window handle on Windows
There's no need to call QPlatformNativeInterface for that
This commit is contained in:
parent
6ac846adbb
commit
9c7fe32830
1 changed files with 1 additions and 10 deletions
|
|
@ -740,16 +740,7 @@ HWND GetWindowHandle(not_null<QWidget*> widget) {
|
||||||
}
|
}
|
||||||
|
|
||||||
HWND GetWindowHandle(not_null<QWindow*> window) {
|
HWND GetWindowHandle(not_null<QWindow*> window) {
|
||||||
if (!window->winId()) {
|
return static_cast<HWND>(window->winId());
|
||||||
window->create();
|
|
||||||
}
|
|
||||||
|
|
||||||
const auto native = QGuiApplication::platformNativeInterface();
|
|
||||||
Assert(native != nullptr);
|
|
||||||
|
|
||||||
return static_cast<HWND>(native->nativeResourceForWindow(
|
|
||||||
QByteArrayLiteral("handle"),
|
|
||||||
window));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void SendWMPaintForce(not_null<QWidget*> widget) {
|
void SendWMPaintForce(not_null<QWidget*> widget) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue