feat: Add notitlebar function on wayland platform - #210
Conversation
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#210
|
[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. DetailsNeeds 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#210
add notitlebar function on wayland platform Log: add notitlebar function on wayland platform
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#210
| target_link_libraries(${LIB_NAME} PUBLIC | ||
| PUBLIC | ||
| Qt::Core | ||
| Qt::Widgets |
| @@ -0,0 +1,82 @@ | |||
| // SPDX-FileCopyrightText: 2023 UnionTech Software Technology Co., Ltd. | |||
| // | |||
| // SPDX-License-Identifier: GPL-3.0-or-later | |||
| #include "dplatformhandle.h" | ||
| #include "dplatformtheme.h" | ||
| #include "dwindowmanagerhelper.h" | ||
| #include "wayland/dcontextshellwindow.h" |
There was a problem hiding this comment.
这种应该要加上编译宏,不然非 wayland(treeland)的可能有编译问题
Synchronize source files from linuxdeepin/dtkgui. Source-pull-request: linuxdeepin/dtkgui#210
| return new DContextShellWindow(window); | ||
| } | ||
|
|
||
| DContextShellWindow *DContextShellWindow::qmlAttachedProperties(QObject *object) |
|
|
||
| class DContextShellWindowPrivate; | ||
|
|
||
| class DContextShellWindow : public QObject |
There was a problem hiding this comment.
这个类会导出去么,如果会的可以用d指针,不导出去的话,可以放到private里,
加上命名空间,
| public: | ||
| ~DContextShellWindow() override; | ||
|
|
||
| int noTitlebar(); |
There was a problem hiding this comment.
对外的应该是bool类型的,跟协议可以不一样,
| { | ||
| s_map.insert(window, this); | ||
| window->create(); | ||
| auto waylandWindow = dynamic_cast<QtWaylandClient::QWaylandWindow *>(window->handle()); |
There was a problem hiding this comment.
这一部分可以放到 get函数里,这样的话可以返回nullptr作为无法创建的标志,外部可以fallback到其它方式去处理notitiebal这种,
|
TAG Bot New tag: 5.6.21 |
|
TAG Bot New tag: 5.6.22 |
|
TAG Bot New tag: 5.6.25 |
|
TAG Bot New tag: 5.6.26 |
|
TAG Bot New tag: 5.6.27 |
|
TAG Bot New tag: 5.6.28 |
|
TAG Bot New tag: 5.6.29 |
|
TAG Bot New tag: 5.6.30 |
|
TAG Bot New tag: 5.6.31 |
|
TAG Bot New tag: 5.6.32 |
|
TAG Bot New tag: 5.6.34 |
add notitlebar function on wayland platform
Log: add notitlebar function on wayland platform