[Bug 50539] New: SetWindowRgn doesn't work correctly
https://bugs.winehq.org/show_bug.cgi?id=50539 Bug ID: 50539 Summary: SetWindowRgn doesn't work correctly Product: Wine Version: 6.0 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs(a)winehq.org Reporter: hjkl(a)quantentunnel.de Distribution: --- Created attachment 69208 --> https://bugs.winehq.org/attachment.cgi?id=69208 Example images and source code The SetWindowRgn function doesn't work correctly. It applies a shape to a window. In the attachment is an example source code which just creates 2 windows and calls SetWindowRgn on both. It uses an elliptic region on the left window and a triangle region on the right one. The image "CorrectOnWindows.png" shows how Windows 10 draws it. The image "IncorrectOnLinuxWithWine.png" shows how Wine on Debian draws it (also tested on Zorin OS with the same result). The elliptic window has a black "shadow" above the window. This might be the same issue as described in "Bug 48636", but I'm not sure. The other window has no shape at all. It's just drawn like SetWindowRgn was never called. The folder "source" of the attached ZIP file contains the Visual Studio 2019 source project and also the compiled EXEs for 32-bit and 64-bit. It's very simple. The interesting part is this for the 1st window: //example 1 with an elliptic region HRGN hRgn=CreateEllipticRgn(0, 0, 250, 200); SetWindowRgn(g_hWnd1, hRgn, TRUE); And this for the 2nd window: //example 2 with a triangle region POINT points[8]; points[0].x=50; points[0].y=0; points[1].x=100; points[1].y=100; points[2].x=0; points[2].y=100; points[3].x=50; points[3].y=0; points[4].x=50; points[4].y=20; points[5].x=80; points[5].y=90; points[6].x=20; points[6].y=90; points[7].x=50; points[7].y=20; hRgn=CreatePolygonRgn(points, 8, ALTERNATE); SetWindowRgn(g_hWnd2, hRgn, TRUE); -- 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=50539 --- Comment #1 from Alexandre Julliard <julliard(a)winehq.org> --- The shape is supposed to cover the window decorations, but we can't do that with the standard X11 decorations. I'd suggest to create a window without title bar, or uncheck the 'decorate windows' option in winecfg. The second one is a bug in CreatePolyPolygonRgn, that's fixed by b67f39ccc6ea4b366e4a839f64d72d5200518a00. -- 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=50539 hjkl(a)quantentunnel.de changed: What |Removed |Added ---------------------------------------------------------------------------- Resolution|--- |FIXED Status|UNCONFIRMED |RESOLVED --- Comment #2 from hjkl(a)quantentunnel.de --- It's fixed -- 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=50539 Alexandre Julliard <julliard(a)winehq.org> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |CLOSED --- Comment #3 from Alexandre Julliard <julliard(a)winehq.org> --- Closing bugs fixed in 7.1. -- 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)
-
WineHQ Bugzilla