[Bug 60180] New: UpdateLayeredWindow ignores a PALETTEINDEX colour key (ULW_COLORKEY)
http://bugs.winehq.org/show_bug.cgi?id=60180 Bug ID: 60180 Summary: UpdateLayeredWindow ignores a PALETTEINDEX colour key (ULW_COLORKEY) Product: Wine Version: 11.15 Hardware: x86-64 OS: Linux Status: UNCONFIRMED Severity: normal Priority: P2 Component: user32 Assignee: wine-bugs@list.winehq.org Reporter: wehrwolfmann@gmail.com Target Milestone: --- Distribution: --- Microsoft Agent 2.0 (AgentSvr.exe, part of the free MS Agent runtime) draws its character in a layered window. With +relay narrowed down to the layered-window calls, this is all it does: Call user32.UpdateLayeredWindow(...,010000fe,00000000,00000001) Ret user32.UpdateLayeredWindow() retval=00000001 dwFlags is ULW_COLORKEY, pblend is NULL, and crKey is 0x010000FE, i.e. PALETTEINDEX(254). The character bitmaps inside the .acs file are 8-bit paletted and entry 254 is the transparent colour, which on screen is #00FFFF. SetWindowRgn is never called, so the colour key is the only thing that is supposed to cut the background away. Wine returns success but the window stays completely opaque: the character sits on a solid cyan rectangle instead of on the desktop. It looks like the key is compared against the raw COLORREF and PALETTEINDEX is never resolved through the source DC palette. I checked the same trace on 7.0 and on 10.0: identical call, same crKey, and SetWindowRgn is not called on either. This is not a regression - I get the same cyan rectangle on every version where the character loads at all. Colour keying itself is not missing in general - bug 15118 implemented it back in 2012. What looks unhandled here is specifically the PALETTEINDEX form of crKey. I have not tested a plain RGB key against this application myself, so treat that last part as a reading of the trace rather than a measurement. -- 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=60180 --- Comment #1 from Ken Sharp <imwellcushtymelike@gmail.com> --- Is this app available for download? Apparently MS named two applications "Agent" to be extra helpful. -- 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=60180 --- Comment #2 from Wehrwolfmann <wehrwolfmann@gmail.com> --- It's the old one: Microsoft Agent 2.0, the animated character runtime from 1998 (AgentSvr.exe plus Merlin/Genie/Robby/Peedy). Not the "agents" Microsoft sells today under Copilot / Microsoft 365 Agents / Agent 365, and not the SMS/monitoring agent either. Microsoft dropped it with Windows 7 (announced April 2009) and took the download pages down. The installers are still in the Wayback Machine, and you don't need any third-party app to see this - the runtime plus one Microsoft character is enough. I ran through the whole thing today from scratch, so these are the exact files that work: core runtime, 400536 bytes, md5 66996a076065ebdcdac85ff9637ceae0 https://web.archive.org/web/20000816030203if_/http://activex.microsoft.com/a... Merlin character, 1873176 bytes, md5 7e00a874540f674991ecfa7c13175c15 https://web.archive.org/web/20021013081243if_/http://agent.microsoft.com/age... Do not take the 2000-08-16 capture of Merlin.exe - it sends Content-Length 1873176 but the archived body stops dead at 1048334 bytes, that crawl truncated it. The 2002 one above comes down whole. Both files are IExpress bundles: "wine MSagent.exe /q:a /r:n" and the same for Merlin.exe install and self-register everything without a single dialog. Then three lines under cscript are enough: Set a = CreateObject("Agent.Control.2") : a.Connected = True a.Characters.Load "m", "C:\windows\msagent\chars\merlin.acs" a.Characters("m").Show : WScript.Sleep 20000 Merlin should float as a cutout; instead he sits in a solid magenta 128x128 box (screenshot attached). I have to correct myself on one point: the key is not always palette entry 254, that number came from the app I first hit this with. Merlin asks for PALETTEINDEX(10). The relay line is UpdateLayeredWindow(hwnd, hdcDst, pptDst, psize, hdcSrc, pptSrc, crKey=0100000a, pblend=NULL, dwFlags=00000001), i.e. ULW_COLORKEY with no blend, and the index is per character - it is a byte in the .acs header (0x0A for Merlin, 0xFE for the other one). So every character trips this, just in a different colour. One catch before you try: on wine 10.17 and newer Characters.Load already fails with 0x80042001 (bug 60177) and nothing is drawn at all. The above is on 10.16, 64-bit prefix, cscript from syswow64. I searched bugzilla, nothing else mentions PALETTEINDEX; 32507 is the closest but that one is about the alpha channel, not the colour key. I also have the +relay,+ole,+win log, say the word and I'll attach 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.
http://bugs.winehq.org/show_bug.cgi?id=60180 --- Comment #3 from Wehrwolfmann <wehrwolfmann@gmail.com> --- Created attachment 81852 --> http://bugs.winehq.org/attachment.cgi?id=81852 Merlin under wine 10.16: solid magenta box instead of a colour-keyed cutout -- 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