Skip to content

Commit

Permalink
feat: support disable change window cursor on dxcb platform
Browse files Browse the repository at this point in the history
Change-Id: I5ef3d48d66b207e1b3d2656c400b33b378d033c7
  • Loading branch information
zccrs committed Mar 5, 2018
1 parent 453f5c4 commit 08f4f2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/widgets/dplatformwindowhandle.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ DEFINE_CONST_CHAR(setWmBlurWindowBackgroundPathList);
DEFINE_CONST_CHAR(setWmBlurWindowBackgroundMaskImage);
DEFINE_CONST_CHAR(setWindowProperty);
DEFINE_CONST_CHAR(pluginVersion);
DEFINE_CONST_CHAR(disableOverrideCursor);

static void setWindowProperty(QWindow *window, const char *name, const QVariant &value)
{
Expand Down Expand Up @@ -354,6 +355,11 @@ bool DPlatformWindowHandle::setWindowBlurAreaByWM(const QList<QPainterPath> &pat
return setWindowBlurAreaByWM(m_window, paths);
}

void DPlatformWindowHandle::setDisableWindowOverrideCursor(QWindow *window, bool disable)
{
window->setProperty(_disableOverrideCursor, disable);
}

int DPlatformWindowHandle::windowRadius() const
{
return m_window->property(_windowRadius).toInt();
Expand Down
2 changes: 2 additions & 0 deletions src/widgets/dplatformwindowhandle.h
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,8 @@ class DPlatformWindowHandle : public QObject
bool setWindowBlurAreaByWM(const QVector<WMBlurArea> &area);
bool setWindowBlurAreaByWM(const QList<QPainterPath> &paths);

static void setDisableWindowOverrideCursor(QWindow *window, bool disable);

int windowRadius() const;

int borderWidth() const;
Expand Down

0 comments on commit 08f4f2a

Please sign in to comment.