[Bug 23187] New: DeferWindowPos behaves wrong when invalid HWND
http://bugs.winehq.org/show_bug.cgi?id=23187 Summary: DeferWindowPos behaves wrong when invalid HWND Product: Wine Version: unspecified Platform: x86 OS/Version: Linux Status: UNCONFIRMED Severity: minor Priority: P2 Component: user32 AssignedTo: wine-bugs(a)winehq.org ReportedBy: rodrigorivascosta(a)gmail.com Created an attachment (id=28848) --> (http://bugs.winehq.org/attachment.cgi?id=28848) Sample program to demonstrate the problem The Wine behavior of the BeginDeferWindowPos/DeferWindowPos/EndDeferWindowPos functions differ from the Windows one when some of the HWND used are invalid: The attached program uses these functions to move several windows at once, but one HWND is purposely hijacked to force the error. In Windows, all the windows but the wrong one are moved. In Wine, however, only the windows "before" the wrong one are moved. It looks like Windows checks the HWNDs to be valid when calling DeferWindowPos whereas Wine checks them when calling EndDeferWindowPos. This can be checked with the output of the attached program: Windows: ------------ BDWP 006D03E7 DWP 006D03E7 DWP 006D03E7 DWP 00000000 Error: 1400 DWP 006D03E7 DWP 006D03E7 DWP 006D03E7 EDWP 1 ------------ Wine: ------------ BDWP 001B0082 DWP 001B0082 DWP 001B0082 DWP 001B0082 DWP 001B0082 DWP 001B0082 DWP 001B0082 EDWP 0 Error: 1400 ------------ Note that the Windows behavior is somewhat different than the documented in MSDN. Regards. -- Rodrigo. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23187 Dmitry Timoshkov <dmitry(a)codeweavers.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |1.2-rc3 --- Comment #1 from Dmitry Timoshkov <dmitry(a)codeweavers.com> 2010-06-15 04:59:13 --- Is there a real application that depends on this? -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23187 --- Comment #2 from Rodrigo <rodrigorivascosta(a)gmail.com> 2010-06-15 05:12:12 --- (In reply to comment #1)
Is there a real application that depends on this?
Real, I don't know. It happened with a private tool from mine. Strictly speaking there was a bug in my program, since it used an invalid HWND. It is now corrected and working. If it happened to me, well, it may happen to other programs. It would be difficult to diagnose, as it usually depends in a bug in the application and in the order of the callings to DeferWindowPos(), so it would only happen sometimes... -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23187 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |download, testcase -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
http://bugs.winehq.org/show_bug.cgi?id=23187 Bruno Jesus <00cpxxx(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|UNCONFIRMED |NEW CC| |00cpxxx(a)gmail.com Ever Confirmed|0 |1 --- Comment #3 from Bruno Jesus <00cpxxx(a)gmail.com> 2012-07-18 19:39:36 CDT --- Still in wine 1.5.9. -- Configure bugmail: http://bugs.winehq.org/userprefs.cgi?tab=email Do not reply to this email, post in Bugzilla using the above URL to reply. ------- You are receiving this mail because: ------- You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=23187 Ken Sharp <imwellcushtymelike(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |Abandoned?, source --- Comment #4 from Ken Sharp <imwellcushtymelike(a)gmail.com> --- Is this still an issue in Wine 1.7.45 or later? -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=23187 --- Comment #5 from Rodrigo <rodrigorivascosta(a)gmail.com> --- (In reply to Ken Sharp from comment #4)
Is this still an issue in Wine 1.7.45 or later?
Yes, Wine still does the same. BTW, I tested it with Win7 and the behavior is consistent win the WinXP I had before. I realize that this is a low priority bug issue (5 years now). I could write the patch myself, if you are willing to review it. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=23187 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords|Abandoned? | -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=23187 --- Comment #6 from Nikolay Sivov <bunglehead(a)gmail.com> --- (In reply to Rodrigo from comment #5)
I realize that this is a low priority bug issue (5 years now). I could write the patch myself, if you are willing to review it.
Yes, please. We'll also need a test included somewhere in user32/tests that demonstrates this case. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=23187 --- Comment #7 from Rodrigo <rodrigorivascosta(a)gmail.com> --- Created attachment 51713 --> https://bugs.winehq.org/attachment.cgi?id=51713 patch that fixes the bug Ok, I've finally written the patch. If think this is not the place and want me to sent it to wine-patches(a)winehq.org, please, say so. I've also checked the case in which the window is valid when calling DeferWindowPos() but it is destroyed before EndDeferWindowPos(). MSWin just ignores this error, so my patch does the same. The patch itself is quite easy, but the test case... I don't know if it fits. Feel free to change whatever needs to be changed. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=23187 Michael Müller <michael(a)fds-team.de> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |STAGED CC| |michael(a)fds-team.de, | |sebastian(a)fds-team.de Staged patchset| |https://github.com/wine-com | |pholio/wine-staging/tree/ma | |ster/patches/user32-DeferWi | |ndowPos -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=23187 Austin English <austinenglish(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Keywords| |patch -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=23187 Nikolay Sivov <bunglehead(a)gmail.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Fixed by SHA1| |fbd9ed0dee968142227e0b0a320 | |da0f81eee0ca1 Status|STAGED |RESOLVED Resolution|--- |FIXED --- Comment #8 from Nikolay Sivov <bunglehead(a)gmail.com> --- This should be fixed now, fbd9ed0dee968142227e0b0a320da0f81eee0ca1. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
https://bugs.winehq.org/show_bug.cgi?id=23187 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #9 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 2.3. -- Do not reply to this email, post in Bugzilla using the above URL to reply. You are receiving this mail because: You are watching all bug changes.
participants (1)
-
wine-bugs@winehq.org