Skip to content

[Feature]: 建议增加 Linux 原生 Wayland layer-shell 后端支持 #6

Description

@rzsgsfm

Existing issues

  • I have searched existing issues and did not find a duplicate.

Problem or use case

我考虑过继续使用当前透明置顶窗口方案,但在 Wayland 环境下仍然存在一些限制:

  • 宠物窗口可能获得焦点
  • 需要额外配置窗口规则
  • 透明区域仍属于普通窗口 surface
  • 不同 compositor 之间行为可能不一致

也考虑过使用普通 floating window 规则解决,但这只能缓解窗口管理问题,无法让桌宠真正成为桌面 overlay。

因此我认为 layer-shell backend 可能是更符合 Wayland 设计的方案。

Proposed solution

希望增加一个 Linux Wayland 原生 layer-shell 后端。

目前 OpenPet 使用透明置顶窗口实现桌宠,这种方式在 Wayland 环境下可以工作,但对于 Niri、Hyprland、Sway 等 compositor,普通窗口和桌面 overlay 有明显区别。

建议保持现有 pet runtime、动画系统、角色包格式不变,仅增加一个可选的窗口渲染 backend:

Wayland layer-shell 可以让桌宠作为 overlay 层存在,而不是普通应用窗口,从而:

  • 减少窗口焦点问题
  • 避免被窗口管理器当成普通应用处理
  • 提升 Niri / Hyprland / Sway 等 Wayland compositor 下的体验
  • 保持现有平台实现不受影响

我认为这种方式可能比修改现有逻辑更容易维护,因为它只是增加一个新的 Linux backend。

Area

Other

Alternatives considered

No response

Additional context

No response

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request.status: needs triageNew issue or PR awaiting maintainer triage.

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions