[UPDATE 4] RFC: XEmbed System Tray Patch
Dimi Paun
dimi at lattica.com
Wed Aug 16 21:02:10 CDT 2006
On Wed, 2006-08-16 at 17:21 -0700, James Liggett wrote:
> inline static BOOL is_window_managed( HWND hwnd )
> {
> DWORD style, ex_style;
> -
> + WCHAR classname[80];
> +
> + ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE );
> + GetClassNameW( hwnd, classname, 80 );
> +
> if (!managed_mode) return FALSE;
> /* tray window is always managed */
> - ex_style = GetWindowLongW( hwnd, GWL_EXSTYLE );
> - if (ex_style & WS_EX_TRAYWINDOW) return TRUE;
> + if (strcmpW( classname, adaptor_classname ) == 0)
> + return TRUE;
> /* child windows are not managed */
> style = GetWindowLongW( hwnd, GWL_STYLE );
> if (style & WS_CHILD) return FALSE;
You can move the ex_style and classname populating calls to
right before their usage, so that they are called only when
needed.
--
Dimi Paun <dimi at lattica.com>
Lattica, Inc.
More information about the wine-devel
mailing list