From b888a8551f1a607e1f72b8e17b1229a17629857b Mon Sep 17 00:00:00 2001 From: zccrs Date: Tue, 16 Jan 2018 09:57:07 +0800 Subject: [PATCH] feat: add property "realWindowId" for DPlatformWindowHandle Change-Id: Ie6cbba40e8342a7761639e60d273fec7405d9d5a --- src/widgets/dplatformwindowhandle.cpp | 5 +++++ src/widgets/dplatformwindowhandle.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/src/widgets/dplatformwindowhandle.cpp b/src/widgets/dplatformwindowhandle.cpp index 987cba0dc..9df301ee9 100644 --- a/src/widgets/dplatformwindowhandle.cpp +++ b/src/widgets/dplatformwindowhandle.cpp @@ -377,6 +377,11 @@ bool DPlatformWindowHandle::autoInputMaskByClipPath() const return m_window->property(_autoInputMaskByClipPath).toBool(); } +WId DPlatformWindowHandle::realWindowId() const +{ + return qvariant_cast(m_window->property("_d_real_content_window")); +} + void DPlatformWindowHandle::setWindowRadius(int windowRadius) { setWindowProperty(m_window, _windowRadius, windowRadius); diff --git a/src/widgets/dplatformwindowhandle.h b/src/widgets/dplatformwindowhandle.h index f921e69cc..05342d2d6 100644 --- a/src/widgets/dplatformwindowhandle.h +++ b/src/widgets/dplatformwindowhandle.h @@ -52,6 +52,7 @@ class DPlatformWindowHandle : public QObject Q_PROPERTY(bool enableSystemMove READ enableSystemMove WRITE setEnableSystemMove NOTIFY enableSystemMoveChanged) Q_PROPERTY(bool enableBlurWindow READ enableBlurWindow WRITE setEnableBlurWindow NOTIFY enableBlurWindowChanged) Q_PROPERTY(bool autoInputMaskByClipPath READ autoInputMaskByClipPath WRITE setAutoInputMaskByClipPath NOTIFY autoInputMaskByClipPathChanged) + Q_PROPERTY(WId realWindowId READ realWindowId CONSTANT) public: explicit DPlatformWindowHandle(QWindow *window, QObject *parent = 0); @@ -100,6 +101,8 @@ class DPlatformWindowHandle : public QObject bool enableBlurWindow() const; bool autoInputMaskByClipPath() const; + WId realWindowId() const; + public Q_SLOTS: void setWindowRadius(int windowRadius);