Commit bccde6b
committed
fix: skip scale factor retrieval on Wayland temporarily
1. Modified scale factor retrieval logic to only query XSettings DBus
interface when running under X11 session
2. Added session type check using XDG_SESSION_TYPE environment variable
3. Added TODO comment explaining that XSettings is not available on
Wayland during early startup
4. This change prevents failed DBus calls and potential startup delays
on Wayland sessions
5. The scale factor is temporarily defaulted to 1.0 on Wayland,
affecting only double-click distance calculation
Log: Fixed Wayland session startup issue by skipping XSettings scale
factor query
Influence:
1. Test application startup on both X11 and Wayland sessions
2. Verify double-click behavior works correctly with default scale
factor on Wayland
3. Ensure no DBus errors appear during Wayland session initialization
4. Confirm X11 sessions still properly retrieve scale factor from
XSettings
5. Test that QT_QPA_PLATFORM environment variable is correctly set based
on session type
fix: Wayland 下暂时跳过缩放因子获取
1. 修改缩放因子获取逻辑,仅在 X11 会话下查询 XSettings DBus 接口
2. 添加使用 XDG_SESSION_TYPE 环境变量的会话类型检查
3. 添加 TODO 注释说明 Wayland 在早期启动阶段无法使用 XSettings
4. 此更改防止 Wayland 会话上的 DBus 调用失败和潜在的启动延迟
5. Wayland 上的缩放因子暂时默认为 1.0,仅影响双击距离计算
Log: 修复 Wayland 会话启动问题,跳过 XSettings 缩放因子查询
Influence:
1. 测试在 X11 和 Wayland 会话上的应用程序启动
2. 验证 Wayland 上使用默认缩放因子的双击行为正常工作
3. 确保 Wayland 会话初始化期间不出现 DBus 错误
4. 确认 X11 会话仍能正确从 XSettings 获取缩放因子
5. 测试 QT_QPA_PLATFORM 环境变量根据会话类型正确设置1 parent 79b98dc commit bccde6b
1 file changed
+12
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
73 | 73 | | |
74 | 74 | | |
75 | 75 | | |
| 76 | + | |
76 | 77 | | |
77 | | - | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
78 | 81 | | |
79 | | - | |
80 | | - | |
81 | | - | |
82 | | - | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
83 | 87 | | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
84 | 91 | | |
85 | 92 | | |
86 | 93 | | |
| |||
94 | 101 | | |
95 | 102 | | |
96 | 103 | | |
97 | | - | |
98 | 104 | | |
99 | 105 | | |
100 | 106 | | |
| |||
0 commit comments