From 0cd7015700befab30f86ad97d3e9a8f7d9ddf2a0 Mon Sep 17 00:00:00 2001 From: CharOfString Date: Sun, 31 May 2026 02:27:11 +0000 Subject: [PATCH 1/3] =?UTF-8?q?update:=20=E4=BD=BF=E7=94=A8Treeland?= =?UTF-8?q?=E4=BD=9C=E4=B8=BAWayland=20WM=E5=B9=B6=E5=BC=95=E5=AF=BC?= =?UTF-8?q?=E6=A1=8C=E9=9D=A2=E5=90=AF=E5=8A=A8.md.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: CharOfString --- ...14\351\235\242\345\220\257\345\212\250.md" | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git "a/\344\275\277\347\224\250Treeland\344\275\234\344\270\272Wayland WM\345\271\266\345\274\225\345\257\274\346\241\214\351\235\242\345\220\257\345\212\250.md" "b/\344\275\277\347\224\250Treeland\344\275\234\344\270\272Wayland WM\345\271\266\345\274\225\345\257\274\346\241\214\351\235\242\345\220\257\345\212\250.md" index 7ed1c7b..e26224a 100644 --- "a/\344\275\277\347\224\250Treeland\344\275\234\344\270\272Wayland WM\345\271\266\345\274\225\345\257\274\346\241\214\351\235\242\345\220\257\345\212\250.md" +++ "b/\344\275\277\347\224\250Treeland\344\275\234\344\270\272Wayland WM\345\271\266\345\274\225\345\257\274\346\241\214\351\235\242\345\220\257\345\212\250.md" @@ -42,6 +42,7 @@ $ sudo apt install libdtk6declarative qml6-module-qt5compat-graphicaleffects > 如果没有其他文件要保存了、也没有其他用户使用的情况下亦可以重启整台电脑。 ### 选项一:纯 Treeland会话 +创建新文件`/usr/bin/start-treeland-plain`并填入如下内容: 如果当前是实体机: ```bash #!/bin/bash @@ -61,9 +62,23 @@ export WLR_RENDERER=pixman # virgl的dmabuf在上面似乎有点问题,用 exec /usr/bin/treeland.sh "$@" ``` -您需要将其保存为:`/usr/share/wayland-sessions/treeland-plain.desktop`。下一次便可以选择`treeland-plain`会话进入。 +--- +创建`/usr/share/wayland-sessions/treeland-plain.desktop`: +```ini +[Desktop Entry] +Name=treeland-plain +Comment=This session starts a plain treeland session. +Exec=/usr/bin/start-treeland-plain +Type=Application +DesktopNames=Treeland +``` + +下一次便可以选择`treeland-plain`会话进入。 ### 选项二:Treeland + GXDE 桌面 +创建新文件`/usr/bin/start-gxde-treeland`并填入如下内容: + + 如果当前是实体机: ```bash #!/bin/bash @@ -85,7 +100,18 @@ export DTK2_XWAYLAND=dxcb exec /usr/bin/treeland.sh -r /usr/bin/startdde "$@" ``` -您需要将其保存为:`/usr/share/wayland-sessions/gxde-treeland.desktop`。下一次便可以选择`gxde-treeland`会话进入。 +--- +创建`/usr/share/wayland-sessions/gxde-treeland.desktop`: +```ini +[Desktop Entry] +Name=gxde-treeland +Comment=This session starts a plain treeland session. +Exec=/usr/bin/start-gxde-treeland +Type=Application +DesktopNames=Treeland (GXDE) +``` + +下一次便可以选择`gxde-treeland`会话进入。 ## 部分Treeland的指令选项 * **`--help`**: 打印帮助。 -- Gitee From 0a53c8c297b1e5c28ba9f3f6976c83d4ad9bef7b Mon Sep 17 00:00:00 2001 From: CharOfString Date: Sun, 31 May 2026 02:29:15 +0000 Subject: [PATCH 2/3] =?UTF-8?q?update:=20=E4=BD=BF=E7=94=A8Treeland?= =?UTF-8?q?=E4=BD=9C=E4=B8=BAWayland=20WM=E5=B9=B6=E5=BC=95=E5=AF=BC?= =?UTF-8?q?=E6=A1=8C=E9=9D=A2=E5=90=AF=E5=8A=A8.md.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: CharOfString --- ...5\257\274\346\241\214\351\235\242\345\220\257\345\212\250.md" | 1 + 1 file changed, 1 insertion(+) diff --git "a/\344\275\277\347\224\250Treeland\344\275\234\344\270\272Wayland WM\345\271\266\345\274\225\345\257\274\346\241\214\351\235\242\345\220\257\345\212\250.md" "b/\344\275\277\347\224\250Treeland\344\275\234\344\270\272Wayland WM\345\271\266\345\274\225\345\257\274\346\241\214\351\235\242\345\220\257\345\212\250.md" index e26224a..09d3128 100644 --- "a/\344\275\277\347\224\250Treeland\344\275\234\344\270\272Wayland WM\345\271\266\345\274\225\345\257\274\346\241\214\351\235\242\345\220\257\345\212\250.md" +++ "b/\344\275\277\347\224\250Treeland\344\275\234\344\270\272Wayland WM\345\271\266\345\274\225\345\257\274\346\241\214\351\235\242\345\220\257\345\212\250.md" @@ -8,6 +8,7 @@ * GXDE截图录屏预计不工作(翻阅源码时发现其在`Wayland`会话下使用`KWAYLAND`) ![GXDE桌面在Treeland上的用户体验问题](./img/gxde-treeland-issue.png) + (***注意**:桌面体验不包含那根顶栏,这是我为了代替不工作的Dock自己写的*) ### 后端相关 -- Gitee From 9cbef57a9a86a387b0b15f763cf957470c592229 Mon Sep 17 00:00:00 2001 From: CharOfString Date: Mon, 1 Jun 2026 07:23:01 +0000 Subject: [PATCH 3/3] =?UTF-8?q?update:=20=E6=96=B0=E5=A2=9E=E3=80=8C?= =?UTF-8?q?=E7=8E=B0=E6=9C=89XCB=E7=A8=8B=E5=BA=8F=E5=9C=A8Wayland?= =?UTF-8?q?=E4=B8=8A=E7=9A=84=E9=80=82=E9=85=8D=E9=97=AE=E9=A2=98=E3=80=8D?= =?UTF-8?q?=E7=AB=A0=E8=8A=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: CharOfString --- ...02\351\205\215\347\254\224\350\256\260.md" | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git "a/Wayland\351\200\202\351\205\215\347\254\224\350\256\260.md" "b/Wayland\351\200\202\351\205\215\347\254\224\350\256\260.md" index a2bbd94..6c4c135 100644 --- "a/Wayland\351\200\202\351\205\215\347\254\224\350\256\260.md" +++ "b/Wayland\351\200\202\351\205\215\347\254\224\350\256\260.md" @@ -1,4 +1,28 @@ # Wayland适配笔记 +## 现有XCB程序在Wayland上的适配问题 +现有X11程序可能在Wayland上错综复杂,有可能其表现不尽人意是由几个库共同作用导致的,在排查时,建议同时排查以下库的源码: +* 当前要适配的Wayland窗体管理器的源码 +* DTK2 + * gxde-qt5integration + * dtk2widget + * dde-qt6platform-plugins +* deepin-daemon +* GXDE API(可选) +* GXDE-WM-Shim(可选) +* DWayland相关(可选,通常不需要) + * qt6-wayland + * dwayland + +举个例子:`gxde-desktop-panel`在Treeland下无法显示图标: +``` +DTreelandPlatformInterface::iconThemeName() + → 返回未初始化的 m_iconThemeName = "" + → 原因: PersonalizationManager 竞态条件 + - initContext() 在 activeChanged 信号中调用 + - 如果 PersonalizationManager 在 DTreelandPlatformInterface 构造前已 active, + 信号在 connect() 之前已发射,initContext() 永远不会被调用 +``` + ## WM选择问题 根据现有的工具链和软件包,最好选择`deepin-kwin_wayland`会话而不是当前的Mutter作为WM。 -- Gitee