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(a)lattica.com> Lattica, Inc.