Skip to content
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

Closed
wants to merge 1 commit into from

Conversation

FeiWang1119
Copy link
Contributor

add window platform interface

Log: as title.

@FeiWang1119 FeiWang1119 requested a review from mhduiy November 28, 2024 06:55
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Nov 28, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
@deepin-ci-robot
Copy link
Contributor

[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 /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Nov 28, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Nov 28, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
@deepin-ci-robot

This comment was marked as spam.

deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Nov 29, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Nov 29, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Nov 29, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Nov 29, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Nov 29, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Dec 4, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Dec 4, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
add window platform interface

Log: as title.
deepin-ci-robot added a commit to linuxdeepin/dtk6gui that referenced this pull request Dec 4, 2024
Synchronize source files from linuxdeepin/dtkgui.

Source-pull-request: linuxdeepin/dtkgui#280
@deepin-bot
Copy link
Contributor

deepin-bot bot commented Dec 4, 2024

TAG Bot

New tag: 5.7.4
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #287

#endif
}

if (g_platformThemeMap.isEmpty()) {
Copy link
Contributor

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;
Copy link
Contributor

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*);
Copy link
Contributor

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);
Copy link
Contributor

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) {
Copy link
Contributor

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
Copy link
Contributor

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

这个是不是可以直接写在DTreeLandPlatformWindowInterface类里,本来也不需要导出,

@deepin-bot
Copy link
Contributor

deepin-bot bot commented Dec 17, 2024

TAG Bot

New tag: 5.7.5
DISTRIBUTION: unstable
Suggest: synchronizing this PR through rebase #289

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants