`steamcompmgr` hacks unnecessarily shortcut window decoration drawing code in "emulate a virtual desktop" mode
还没有人认领这个 Issue。
评估
- 难度
- 4/5
- 预计耗时
- 3-5 天
- 新手友好度
- 38/100
- Issue 类型
- 缺陷
- 描述清晰度
- 基本清楚
- 活跃度
- 停滞
- 技术栈
- c
调研方向
先从 dlls/user32/nonclient.c、dlls/user32/winpos.c 和 dlls/user32/win.c 中链接的检查开始,然后跟踪 dlls/winex11.drv/window.c 中 Proton 专用的窗口管理器处理,以及 desktop.c 中的相关逻辑。比较这些路径在桌面模式和游戏模式下的行为,并验证虚拟桌面的窗口装饰能够显示,同时不会丢失现有的非虚拟桌面行为。
由索引模型根据 Issue 内容生成。
描述
Proton Wine includes some hacks specific to the steamcompmgr window manager, for turning off window decorations. This is obviously reasonable and useful for several reasons which aren't pertinent to this issue.
One thing that this gets in the way of is Wine's "emulate a virtual desktop" mode, wherein Wine will create a single window into which it draws all running applications' windows. It's most important for older Windows 3/95/98 era games (and, of course, productivity software), where sometimes you had a separate window for a fancy new 3-D view and other controls ran in another window with basic GDI/winforms.
Wine's support for this is available graphically through winecfg or through winetricks/protontricks' vd=640x480 verbs. Both result in the same registry change which affects Wine's start-up behaviour.
Proton still supports this mode, and its Wine will gladly draw you a (delightfully windows 2000-coloured) desktop and window decorations, but when run under steamcompmgr/gaming mode, Wine's window decorations are missing within Wine's desktop. Run under desktop mode, Wine's window decorations are drawn:

However within gaming mode, the window decorations are missing:

Both of these screenshots are of the same program running under the same current Proton Experimental build launched under stable Steam, the only difference is launching in desktop vs gaming mode.
This is due to these checks (collapsed for brevity)
In a build with the above shortcuts removed, the window decorations are available under gaming mode.
I would much prefer for this to be the default behaviour when in "emulate a virtual desktop" mode.
To that end, I investigated shortcutting the code which sets the Proton-specific window manager information in dlls/winex11.drv/window.c to skip setting the window manager hint if under desktop mode, but my approach of checking if the root window was the default root window (based on a similar check in desktop.c) was not successful:
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 5d46391f2ce..3b7f862c14b 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -129,7 +129,7 @@ static int detect_wm(Display *dpy)
static int cached = -1;
- if(cached < 0){
+ if(cached < 0 && root_window == root){
if (XGetWindowProperty( display, root, x11drv_atom(_NET_SUPPORTING_WM_CHECK), 0,
sizeof(*wm_check)/sizeof(CARD32), False, x11drv_atom(WINDOW),
I believe this window code may be run once per window instead of once per desktop, defeating this approach.
My knowledge of the wine codebase is not deep, so this is as far as I've been able to get. I would welcome any input on how I might accomplish this while keeping the Proton-specific code in place for the intended effect in non-virtual desktop mode. Thank you!
- 主要语言
- C
- 星标
- 2.1k
- 派生
- 564
- PR 合并指标
- 30 天内没有已合并 PR
环境准备
这个项目没有提供开发容器、Dockerfile 或贡献指南,环境需要你自己搭建:先看它的 README,通用步骤见我们的新手贡献指南。
从这里开始
- 先读完整个 Issue,再读项目的贡献指南。
- 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
- Fork 仓库,在一个分支上完成修改。
- 提交 Pull Request,并在描述里引用这个 Issue 编号。
ValveSoftware/wine 的其他 Issue
-
难度 2/5 1-3 小时 新手友好度 72/100
ValveSoftware/wine#366 · 1 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 72/100
ValveSoftware/wine#363 · 1 个 reaction ·
-
难度 1/5 1 小时以内 新手友好度 92/100
ValveSoftware/wine#353 ·
-
难度 1/5 1 小时以内 新手友好度 78/100
ValveSoftware/wine#303 · 3 条评论 ·
-
难度 2/5 1-3 小时 新手友好度 38/100
ValveSoftware/wine#372 ·
查看 ValveSoftware/wine 的全部 Issue
相似的 Issue
-
难度 2/5 1-3 小时 新手友好度 70/100
OpenPrinting/cups#1833 ·
维护者通常 2 天内回复
-
难度 2/5 1-3 小时 新手友好度 62/100
compiler-explorer/compiler-explorer#9710 ·
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 72/100
维护者通常 1 天内回复
-
难度 2/5 1-3 小时 新手友好度 75/100
维护者通常 2 天内回复
-
难度 1/5 1 小时以内 新手友好度 62/100
libsndfile/libsndfile#1238 ·