fix: make X11 bypass window manager hint configurable - #1705
Conversation
1. Add `useX11BypassWindowManagerHint` property to `PanelPopupWindow` with default value of `true` 2. Expose the same property on `PanelPopup` for per-instance override 3. Add a Binding to propagate the property from `PanelPopup` to the internal popup window 4. Conditionally apply `Qt.X11BypassWindowManagerHint` in window flags only when enabled 5. This allows individual popup instances to disable the hint for WM compatibility Log: Popup windows can now optionally disable the X11 bypass window manager hint for compatibility with certain window managers Influence: 1. Test panel popup windows on X11 with default settings to verify no regression 2. Test popup behavior with `useX11BypassWindowManagerHint` set to `false` to ensure window manager decorations and management work correctly 3. Verify popup positioning, focus behavior, and stacking with both values of the property 4. Test on Wayland to confirm no impact on existing behavior 5. Test popups across different panel plugins to ensure compatibility fix: 使 X11 绕过窗口管理器提示可配置 1. 在 `PanelPopupWindow` 中添加 `useX11BypassWindowManagerHint` 属性,默 认值为 `true` 2. 在 `PanelPopup` 上暴露相同属性,支持按实例覆盖 3. 添加 Binding 将该属性从 `PanelPopup` 传播到内部弹出窗口 4. 仅当属性启用时,才在窗口标志中有条件地应用 `Qt.X11BypassWindowManagerHint` 5. 这允许单个弹出窗口实例禁用该提示以兼容特定窗口管理器 Log: 弹出窗口现在可以可选地禁用 X11 绕过窗口管理器提示,以便兼容某些窗口 管理器 Influence: 1. 在 X11 上使用默认设置测试面板弹出窗口,验证无回归 2. 将 `useX11BypassWindowManagerHint` 设置为 `false` 测试弹出行为,确保 窗口管理器装饰和管理正常工作 3. 验证两种属性值下的弹出窗口定位、焦点行为和层叠顺序 4. 在 Wayland 上测试,确认对现有行为无影响 5. 测试不同面板插件的弹出窗口以确保兼容性 PMS: TASK-394541
|
[APPROVALNOTIFIER] This PR is NOT APPROVED This pull-request has been approved by: wjyrich 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 |
Reviewer's guide (collapsed on small PRs)Reviewer's GuideMake the X11 bypass window manager hint configurable per popup by adding a new property to PanelPopupWindow and PanelPopup, binding it between them, and conditionally applying the X11 hint in window flags based on that property. Sequence diagram for per-popup X11 bypass hint configurationsequenceDiagram
participant PanelPopup
participant Binding
participant PanelPopupWindow
PanelPopup->>PanelPopup: useX11BypassWindowManagerHint = false
PanelPopup->>Binding: readyBinding = true
Binding->>PanelPopupWindow: useX11BypassWindowManagerHint = PanelPopup.useX11BypassWindowManagerHint
alt [Qt.platform.pluginName === xcb]
alt [useX11BypassWindowManagerHint true]
PanelPopupWindow->>PanelPopupWindow: flags = Qt.Tool | Qt.WindowStaysOnTopHint | Qt.X11BypassWindowManagerHint
else [useX11BypassWindowManagerHint false]
PanelPopupWindow->>PanelPopupWindow: flags = Qt.Tool | Qt.WindowStaysOnTopHint
end
else [Qt.platform.pluginName !== xcb]
PanelPopupWindow->>PanelPopupWindow: flags = Qt.Popup
end
File-Level Changes
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
deepin pr auto review★ 总体评分:100分■ 【总体评价】
■ 【详细分析】
■ 【改进建议代码示例】 // 当前代码已经很好地实现了功能且无安全问题,无需修改。
// 以下展示如何在具体使用场景中覆盖该属性以禁用 BypassWindowManagerHint:
// 在某个特定的弹窗实例中(例如需要窗口管理器管理其焦点和位置的弹窗):
PanelPopup {
useX11BypassWindowManagerHint: false // 覆盖默认值,允许窗口管理器接管
// ... 其他属性配置
} |
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- In
PanelPopupWindow.flags, consider usingQt.WindowFlags(0)instead of bare0for the disabled hint branch to make the type and intent clearer and avoid relying on implicit enum coercion.
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- In `PanelPopupWindow.flags`, consider using `Qt.WindowFlags(0)` instead of bare `0` for the disabled hint branch to make the type and intent clearer and avoid relying on implicit enum coercion.Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
useX11BypassWindowManagerHintproperty toPanelPopupWindowwith default value oftruePanelPopupfor per-instance overridePanelPopupto the internal popup windowQt.X11BypassWindowManagerHintin window flags only when enabledLog: Popup windows can now optionally disable the X11 bypass window manager hint for compatibility with certain window managers
Influence:
useX11BypassWindowManagerHintset tofalseto ensure window manager decorations and management work correctlyfix: 使 X11 绕过窗口管理器提示可配置
PanelPopupWindow中添加useX11BypassWindowManagerHint属性,默 认值为truePanelPopup上暴露相同属性,支持按实例覆盖PanelPopup传播到内部弹出窗口Qt.X11BypassWindowManagerHintLog: 弹出窗口现在可以可选地禁用 X11 绕过窗口管理器提示,以便兼容某些窗口
管理器
Influence:
useX11BypassWindowManagerHint设置为false测试弹出行为,确保 窗口管理器装饰和管理正常工作PMS: TASK-394541
Summary by Sourcery
Make the X11 bypass window-manager hint configurable for panel popup instances.
New Features:
Enhancements: