[Bug 60556] New: winex11.drv: per-pixel alpha layered windows show stale or black areas under Xwayland because of the bounding shape
http://bugs.winehq.org/show_bug.cgi?id=60556 Bug ID: 60556 Summary: winex11.drv: per-pixel alpha layered windows show stale or black areas under Xwayland because of the bounding shape Product: Wine Version: 11.20 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: winex11.drv Assignee: wine-bugs@list.winehq.org Reporter: alessandro.abbinante@live.it Target Milestone: --- Distribution: --- Autodesk Fusion 360's floating panels (Browser, Comments) are top-level WS_EX_LAYERED windows with per-pixel alpha (32-bit ARGB X windows, about 300x1190, mostly transparent below the tree). After the panel is moved or a design is opened, part of it shows the panel's old contents and the area the window grew into stays opaque black. The application keeps drawing correctly into it. This is not related to Direct3D (unlike bug 60173): there is no swap chain on these windows. Environment: Arch Linux, wine 11.20 (Arch package), winex11.drv, Hyprland 0.56 with Xwayland 24.1.14, NVIDIA RTX 5080 with driver 615.78. What I observed: - XGetImage of the panel window returns the correct contents: opaque pixels for the tree and 0x00000000 below it. A screenshot of the same area taken at the same moment shows grey panel and black instead. - Drawing an opaque rectangle into the window with XFillRectangle in the lower area changes neither the screen nor a following XGetImage, as expected if that area is outside the window's bounding shape. Analysis (from reading dlls/winex11.drv/bitblt.c at wine-11.20 and current master): x11drv_surface_flush() sets the window's ShapeBounding from the shape bits whenever they change (the mask of non transparent pixels). With Xwayland, what falls outside the bounding shape is no longer updated in the buffer the compositor shows, so after the shape shrinks or the window grows those areas keep old contents or stay black. For a surface with an alpha channel (ARGB visual) the bounding shape is not needed to show transparency: the alpha already does it. It is still useful for input, so that clicks go through transparent parts. As an experiment, applying the same mask as ShapeInput instead of ShapeBounding for surfaces created with use_alpha makes the panels show correctly (I have not checked yet that clicks go through their transparent part). Windows without an alpha channel would keep the bounding shape. I have only tested Hyprland's Xwayland, not a plain X server or other compositors. I am not attaching that change: it was written with an AI assistant, which the Developer FAQ does not accept. -- 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