https://bugs.winehq.org/show_bug.cgi?id=39170
Bug ID: 39170 Summary: Creatures view window is rendered incorrectly when using WM decorations. Product: Wine Version: 1.7.50 Hardware: x86 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@winehq.org Reporter: rw92672685@hotmail.com Distribution: ---
Created attachment 52202 --> https://bugs.winehq.org/attachment.cgi?id=52202 The rendered windowed.
When running the 1996 MFC game Creatures, the Creature View pop-up window is rendered incorrectly when Wine is configured to allow the window manager to decorate windows. With the setting disabled, it is rendered correctly.
When rendered correctly, the Window should have a 128x96 client area. Incorrectly, it has a client area of 134x121, which happens to be the exact size of a corrected rendered window including its decorations.
To isolate the window manager out of it, I ran with decorations on both Fluxbox and Unity which both experienced the bug.
Using NirSoft's WinExplorer on Windows, the following styles are activated on this popup window; WS_DLGFRAME, WS_BORDER, WS_CLIPSIBLINS, WS_VISABLE, WS_POPUP, and WS_EX_WINDOWEDGE. It's window class has the style of; CS_HREDRAW, and CS_VREDRAW.
May be worth mentioning; the program make no use of AdjustWindowRect() due to its age, instead seems to only use GetSystemMetrics() and NONCLIENTMETRICS.
Running the most recent Wine as of this writing, compiled from source, at commit; 6056a3f1634a72e181fb3a03ca625aaa7720523e. Running Ubuntu amd64 15.04.
https://bugs.winehq.org/show_bug.cgi?id=39170
--- Comment #1 from Richard rw92672685@hotmail.com --- Created attachment 52225 --> https://bugs.winehq.org/attachment.cgi?id=52225 Wine debugging channel with x11drv.
https://bugs.winehq.org/show_bug.cgi?id=39170
Richard rw92672685@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Attachment #52225|0 |1 is obsolete| |
--- Comment #2 from Richard rw92672685@hotmail.com --- Created attachment 52236 --> https://bugs.winehq.org/attachment.cgi?id=52236 Logs with +x11drv,+win.
I spent a few hours on this just now and found a fix for it. The window is initially created with a size of 0x0. get_mwm_decorations() won't consider any window of this size to have WM decorations, which appears to report an incorrect size that causes a problem with Creatures when it resizes the window later on.
I've attached the debug logs containing +x11drv,+win when this window is created and destroyed, with and without VM decorations enabled. I've also included a version with this patch applied.
I should mention that this is my first Wine patch and unable to vouch how clean or correct this is. That said though, it's only a single line.
https://bugs.winehq.org/show_bug.cgi?id=39170
--- Comment #3 from Richard rw92672685@hotmail.com --- Created attachment 52237 --> https://bugs.winehq.org/attachment.cgi?id=52237 Possible fix.
https://bugs.winehq.org/show_bug.cgi?id=39170
Alistair Leslie-Hughes leslie_alistair@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |15c0bcb3d8eff7c38def24b5863 | |3bb1d6116d8c4 Status|UNCONFIRMED |RESOLVED CC| |leslie_alistair@hotmail.com Resolution|--- |FIXED
--- Comment #4 from Alistair Leslie-Hughes leslie_alistair@hotmail.com --- Fixed by commit 15c0bcb3d8eff7c38def24b58633bb1d6116d8c4
https://bugs.winehq.org/show_bug.cgi?id=39170
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- CC| |mstefani@redhat.com Target Milestone|--- |1.8.x
https://bugs.winehq.org/show_bug.cgi?id=39170
Richard rw92672685@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |UNCONFIRMED Resolution|FIXED |---
--- Comment #5 from Richard rw92672685@hotmail.com --- Not fixed, at least not for me on a clean WINE prefix running wine-1.9.1-59-gf2ceadc, the latest git (f2ceadc6e6e6b7906400b6df84ac385d263cf394) as of this writing.
https://bugs.winehq.org/show_bug.cgi?id=39170
Richard rw92672685@hotmail.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.7.50 |1.9.1
https://bugs.winehq.org/show_bug.cgi?id=39170
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Version|1.9.1 |1.7.50
--- Comment #6 from Michael Stefaniuc mstefani@redhat.com --- Please do not change the Version field. It is for the initially reported version.
https://bugs.winehq.org/show_bug.cgi?id=39170
Michael Stefaniuc mstefani@redhat.com changed:
What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|1.8.x |---