Skip to content

Commit

Permalink
feat: add property "realWindowId" for DPlatformWindowHandle
Browse files Browse the repository at this point in the history
Change-Id: Ie6cbba40e8342a7761639e60d273fec7405d9d5a
  • Loading branch information
zccrs committed Jan 16, 2018
1 parent 636b598 commit b888a85
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/widgets/dplatformwindowhandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -377,6 +377,11 @@ bool DPlatformWindowHandle::autoInputMaskByClipPath() const
return m_window->property(_autoInputMaskByClipPath).toBool();
}

WId DPlatformWindowHandle::realWindowId() const
{
return qvariant_cast<WId>(m_window->property("_d_real_content_window"));
}

void DPlatformWindowHandle::setWindowRadius(int windowRadius)
{
setWindowProperty(m_window, _windowRadius, windowRadius);
Expand Down
3 changes: 3 additions & 0 deletions src/widgets/dplatformwindowhandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down Expand Up @@ -100,6 +101,8 @@ class DPlatformWindowHandle : public QObject
bool enableBlurWindow() const;
bool autoInputMaskByClipPath() const;

WId realWindowId() const;

public Q_SLOTS:
void setWindowRadius(int windowRadius);

Expand Down

0 comments on commit b888a85

Please sign in to comment.