Minor fixes for Xwayland apps - #1199
Conversation
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: LFRon 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 |
|
Hi @LFRon. Thanks for your PR. I'm waiting for a linuxdeepin member to verify that this patch is reasonable to test. If it is, they should reply with Once the patch is verified, the new status will be reflected by the I understand the commands that are listed here. DetailsInstructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. |
|
TAG Bot New tag: 0.8.16 |
697d0e0 to
7e030ca
Compare
There was a problem hiding this comment.
Pull request overview
EN: This PR targets “minor fixes for XWayland apps” by improving launch-time state/geometry negotiation (especially initial maximize), making resize/configure behavior more explicit when surfaces/items are hidden, and moving initial XDG toplevel configure scheduling into the protocol layer so it doesn’t depend on QtQuick item creation timing.
中文:该 PR 主要针对 XWayland 应用在启动阶段的状态/几何协商问题(尤其是首次最大化),显式化隐藏状态下的 resize/configure 行为,并将 XDG toplevel 的 initial configure 调整到协议层触发,避免依赖 QtQuick Item 创建时序。
Changes:
- EN: Add an explicit “configure while hidden” path for XWayland surface items and propagate resize success/failure.
中文:为 XWayland surface item 增加“隐藏时仍可 configure”的路径,并将 resize 是否真正发出 configure 的结果向上返回。 - EN: Introduce “maximize requested” APIs for XWayland/XDG toplevel surfaces and wire initial XDG maximize configuration through
ShellHandler(including deferred adoption when wrapper creation is async).
中文:为 XWayland/XDG toplevel 增加“客户端请求最大化”读取接口,并在ShellHandler中配置/延后应用 XDG 的初始最大化(适配 wrapper 异步创建)。 - EN: Improve prelaunch/restore-size retention and normal-geometry capture to avoid persisting invalid sizes (e.g., maximized presentation geometry).
中文:改进 prelaunch 恢复尺寸保留与 normal geometry 捕获逻辑,避免持久化错误尺寸(例如最大化展示尺寸)。
Reviewed changes
Copilot reviewed 13 out of 13 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
waylib/src/server/qtquick/wxwaylandsurfaceitem.h |
Adds API to configure XWayland surface even when hidden (single-call bypass). |
waylib/src/server/qtquick/wxwaylandsurfaceitem.cpp |
Makes hidden configure return failure unless explicitly allowed; implements configureSurfaceWhileHidden(). |
waylib/src/server/qtquick/wxdgtoplevelsurfaceitem.cpp |
Removes initial-commit configure from QtQuick item path (moved to protocol layer). |
waylib/src/server/protocols/wxwaylandsurface.h |
Adds isMaximizeRequested() API (requested state vs compositor-ack state). |
waylib/src/server/protocols/wxwaylandsurface.cpp |
Uses wrapper helper is_maximized() and exposes requested-maximize query. |
waylib/src/server/protocols/wxdgtoplevelsurface.h |
Adds requested-maximize query and initialConfigureRequested() signal. |
waylib/src/server/protocols/wxdgtoplevelsurface.cpp |
Schedules initial configure on initial commit; updates request-state checks; adds categorized logging. |
src/surface/surfacewrapper.h |
Adds normal-geometry source tracking, deferred state machinery, and initial-maximize orchestration APIs/state. |
src/surface/surfacewrapper.cpp |
Implements initial maximize negotiation (XWayland + XDG), deferred state transitions, and robust normal-geometry capture. |
src/core/shellhandler.h |
Adds unmatched-prelaunch retention bookkeeping and initial XDG maximize configuration plumbing. |
src/core/shellhandler.cpp |
Implements retention of restore-size across prelaunch mismatch and initial XDG maximize configure/cancel flows. |
qwlroots/src/types/qwxwaylandsurface.h |
Adds is_maximized() convenience accessor for XWayland surface state bits. |
qwlroots/src/types/qwxdgshell.h |
Adds inline helpers for initial commit and requested states on xdg_toplevel. |
|
只有这一个建议嘛( |
6a18bc7 to
d436773
Compare
XWayland and XDG clients can request maximization before Treeland has created or exposed a SurfaceWrapper. Handling that request only after map leaves the client and compositor state out of sync, or produces a visible second maximize transition after the window is presented. For XDG toplevels, notify Treeland synchronously from Waylib's initial empty commit after scheduling the default 0x0 configure. ShellHandler selects the output work area and folds the size and maximized state into wlroots' pending initial configure. Carry the accepted geometry across asynchronous AppId and prelaunch wrapper creation, adopt it without a second configure or animation, and reveal the client after a matching buffer is committed. Keep XWayland's post-map hidden configure path. Preserve only reliable normal geometry for restore and persistence, replay state changes deferred during launch transitions, and retain a 1500 ms presentation timeout so an unresponsive client cannot remain hidden indefinitely. Expose the required request-state helpers through qwlroots and Waylib, and report hidden XWayland configure failure instead of treating it as success. Log: 修复XWayland及原生Wayland应用启动时请求最大化但窗口未正确最大化的问题 Influence: XWayland/XDG窗口初始最大化协商、预启动Splash交接及窗口化尺寸恢复
Prelaunch wrappers can already be active when their managed XWayland surface is attached. Because the activated wrapper does not change, the normal activation path does not raise the new native X11 window. Treeland then reports the app as active while X11 input can remain stacked behind another window. Before exposing the real surface, raise both the Treeland item and native X11 window. Limit this to active managed surfaces so inactive and override-redirect windows are unaffected. Log: 修复XWayland预启动窗口切换后点击穿透的问题 Influence: XWayland预启动Splash切换到真实窗口时的堆叠顺序
|
@LFRon [fix(xwayland): sync active prelaunch stacking on handoff]看着能更快合入,可否拆分为两个PR? |
可以的, 我明天试试 |
|
TAG Bot New tag: 0.8.17 |
|
TAG Bot New tag: 0.8.18 |
|
TAG Bot New tag: 0.9.0 |
|
该PR意义不大了,故先关闭 |
本人试着对Xwayland应用做的一些修复