-
Notifications
You must be signed in to change notification settings - Fork 56
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: add window platform interface #280
Conversation
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: FeiWang1119 The full list of commands accepted by this bot can be found here.
Needs approval from an approver in each of these files:
Approvers can indicate their approval by writing |
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
This comment was marked as spam.
This comment was marked as spam.
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
add window platform interface Log: as title.
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#280
TAG Bot New tag: 5.7.4 |
#endif | ||
} | ||
|
||
if (g_platformThemeMap.isEmpty()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getPlatformWindowInterface 查找为null才fallback到默认的, 或者声明一个变量,最后判断变量是否为null来fallback到默认的,
virtual bool autoInputMaskByClipPath() const; | ||
virtual void setAutoInputMaskByClipPath(bool autoInputMaskByClipPath); | ||
|
||
virtual WId realWindowId() const; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个应该不需要暴露吧,
|
||
class LIBDTKCORESHARED_EXPORT DPlatformWindowInterfaceFactory { | ||
public: | ||
using HelperCreator = DPlatformWindowInterface * (*)(QWindow *, DPlatformHandle*); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
名字不需要Helper,
void enableDXcb(); | ||
void enableDXcb(bool redirectContent); | ||
bool isEnabledDXcb(); | ||
bool eventFilterForXcb(QObject *obj, QEvent *event); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个改名为eventFilter,跟之前的DPlatformHandler一样,将DPlatformHandler::eventFilter移除掉,
@@ -153,7 +155,7 @@ class Q_DECL_HIDDEN WindowEventFilter : public QObject { | |||
} | |||
|
|||
public: | |||
bool eventFilter(QObject *watched, QEvent *event) override { | |||
bool eventFilter(QObject *watched, QEvent *event) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
override应该可以保留,
DTreeLandPlatformWindowInterface::DTreeLandPlatformWindowInterface(QObject *parent, QWindow *window) | ||
: QObject(parent) | ||
, m_window(window) | ||
DGUI_BEGIN_NAMESPACE |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
命名空间是不是可以将上面的几个类也包含着,
|
||
DGUI_BEGIN_NAMESPACE | ||
|
||
class DTreeLandPlatformWindowInterfacePrivate : public DPlatformWindowInterfacePrivate |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
这个是不是可以直接写在DTreeLandPlatformWindowInterface类里,本来也不需要导出,
TAG Bot New tag: 5.7.5 |
add window platform interface
Log: as title.