Skip to content

fix: skip decoration for all Layer Shell surfaces#1074

Closed
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/layer-shell-decoration
Closed

fix: skip decoration for all Layer Shell surfaces#1074
deepin-wm wants to merge 1 commit into
linuxdeepin:masterfrom
deepin-wm:fix/layer-shell-decoration

Conversation

@deepin-wm

Copy link
Copy Markdown
Contributor

Summary

Fix OSD showing square-corner shadow in treeland mode by preventing decoration creation for all Layer Shell surfaces.

Changes

  1. Change condition from !isLaunchpad(layer) to !layer in updateNoTitlebar lambda in src/seat/helper.cpp
  2. Add comment explaining why Layer Shell surfaces should not have server-side decoration regardless of Personalization noTitlebar state

Root Cause

Layer Shell surfaces (OSD, notifications, dock) were incorrectly getting server-side decorations when Personalization protocol set noTitlebar. The original condition !isLaunchpad(layer) only excluded launchpad, leaving other Layer Shell surfaces (like OSD) vulnerable. SurfaceWrapper::radius() returns 0 for Layer Shell surfaces, causing XdgShadow to render with square corners.

Testing

  • Verify OSD (e.g. Caps Lock indicator) no longer shows shadow
  • Verify Dock and notification surfaces have no decoration
  • Verify XDG Toplevel window decoration behavior is unchanged
  • Verify Launchpad still has no decoration as before

PMS: BUG-367541

1. Change condition from !isLaunchpad(layer) to !layer in
   updateNoTitlebar lambda to prevent decoration creation for
   all Layer Shell surfaces, not just launchpad
2. Add comment explaining why Layer Shell surfaces should not
   have server-side decoration regardless of noTitlebar state
3. This fixes OSD showing square-corner shadow when noTitlebar
   is set via Personalization protocol

Log: Fixed OSD showing square-corner shadow in treeland mode

Influence:
1. Verify OSD (e.g. Caps Lock indicator) no longer shows shadow
2. Verify Dock and notification surfaces have no decoration
3. Verify XDG Toplevel window decoration behavior is unchanged
4. Verify Launchpad still has no decoration as before

fix: 跳过所有 Layer Shell 表面的装饰创建

1. 将 updateNoTitlebar lambda 中的条件从 !isLaunchpad(layer)
   改为 !layer,阻止所有 Layer Shell 表面创建装饰,而非仅
   限 launchpad
2. 添加注释说明 Layer Shell 表面不应受 Personalization
   noTitlebar 影响而创建服务端装饰的设计意图
3. 修复 OSD 在 noTitlebar 状态下显示方角阴影的问题

Log: 修复 treeland 模式下 OSD 显示方角阴影的问题

Influence:
1. 验证 OSD(如大小写指示器)不再显示阴影
2. 验证 Dock 和通知表面无装饰
3. 验证 XDG Toplevel 窗口的装饰行为不变
4. 验证 Launchpad 仍无装饰

PMS: BUG-367541
@deepin-ci-robot

Copy link
Copy Markdown

Skipping CI for Draft Pull Request.
If you want CI signal for your change, please convert it to an actual PR.
You can still manually trigger a test run with /test all

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Sorry @deepin-wm, you have reached your weekly rate limit of 500000 diff characters.

Please try again later or upgrade to continue using Sourcery

@deepin-ci-robot

Copy link
Copy Markdown

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by: deepin-wm

The full list of commands accepted by this bot can be found here.

Details 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-wm

Copy link
Copy Markdown
Contributor Author

关闭此PR,按照新的架构方案重新实现

@deepin-wm deepin-wm closed this Jul 1, 2026
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.

2 participants