System tray integration take 5

Alexandre Julliard julliard at winehq.org
Mon Jul 21 21:52:55 CDT 2003


Mike Hearn <mike at theoretic.com> writes:

> +#define MAX_TRAY_ICONS 256
> +int undockedTrayIconsCount = 0;
> +static HWND undockedTrayIcons[MAX_TRAY_ICONS]; /* stores HWNDs of undocked tray windows when a
> +						  NETWM tray window appears, we can dock */

You shouldn't use a global array here. This is not thread safe, plus
you'd need to keep track of window destruction to remove them from the
array. The right way IMO would be to walk the window tree checking for
WS_EX_TRAYWINDOW at the time a tray window appears.

-- 
Alexandre Julliard
julliard at winehq.com



More information about the wine-devel mailing list