Palettes - Any experts?

Ove Kaaven ovek at
Fri Apr 18 09:03:20 CDT 2003

tir, 15.04.2003 kl. 20.23 skrev Ann and Jason Edmeades:
> >> This RealizePalette call (UserRealizePalette, windows\painting.c) results
> in
> >> 256 colors being mapped in, and SendMessageA( HWND_BROADCAST,
> >> WM_PALETTECHANGED, (WPARAM)hWnd, 0L); to occur. This broadcast hangs
> >> attempting to send the message to the first thread as it is in a hung
> state
> >> waiting for another process to end. Under windows, the RealizePalette
> >> returns 0, and spy on Windows does not show this message being sent to
> the
> >> 'hung' thread.
> >The message should probably be sent with SendMessageTimeout with the
> >SMTO_ABORTIFHUNG flag. The only problem is that this flag is not
> >implemented yet...
> Prossibly, and let me guess.. "if the receiving process appears to be in a
> "hung" state"
> is difficult to determine? (Otherwise, I guess it isnt that difficult to
> implement
> as the rest of it is all there).
> The only reason I hesitate to agree with you is the difference in the
> RealizePalette
> returns, one (wine) indicating 256 colors had to be changed, the other
> (win2k)
> indicating none had to be.  Maybe this is a side effect of our x11drv
> palette
> implementation, but it still is slightly worrying?

Do you actually run Windows in a 256-color mode? If not, then Windows
does not have a need for messing with a system palette, so it neither
honors realization requests nor does it send any palette messages (not
even WM_QUERYNEWPALETTE, which wine always sent last time I checked).

More information about the wine-devel mailing list