winex11: Child windows don't get activated even when requested, so don't make them managed either.

This commit is contained in:
Alexandre Julliard 2007-08-27 12:37:14 +02:00
parent 7ce277d018
commit effdfa7da4
3 changed files with 6 additions and 5 deletions

View file

@ -66,7 +66,7 @@ static const char visual_id_prop[] = "__wine_x11_visual_id";
*
* Check if a given window should be managed
*/
BOOL is_window_managed( HWND hwnd, const RECT *window_rect )
BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect )
{
DWORD style, ex_style;
@ -76,6 +76,9 @@ BOOL is_window_managed( HWND hwnd, const RECT *window_rect )
/* child windows are not managed */
style = GetWindowLongW( hwnd, GWL_STYLE );
if ((style & (WS_CHILD|WS_POPUP)) == WS_CHILD) return FALSE;
/* activated windows are managed */
if (!(swp_flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW))) return TRUE;
if (hwnd == GetActiveWindow()) return TRUE;
/* windows with caption are managed */
if ((style & WS_CAPTION) == WS_CAPTION) return TRUE;
/* tool windows are not managed */

View file

@ -252,9 +252,7 @@ BOOL X11DRV_SetWindowPos( HWND hwnd, HWND insert_after, const RECT *rectWindow,
root_window == DefaultRootWindow( display ) &&
data->whole_window != root_window)
{
if (!(swp_flags & (SWP_NOACTIVATE|SWP_HIDEWINDOW)) ||
is_window_managed( hwnd, rectWindow ) ||
hwnd == GetActiveWindow())
if (is_window_managed( hwnd, swp_flags, rectWindow ))
{
TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window );
make_managed = TRUE;

View file

@ -684,7 +684,7 @@ typedef int (*x11drv_error_callback)( Display *display, XErrorEvent *event, void
extern void X11DRV_expect_error( Display *display, x11drv_error_callback callback, void *arg );
extern int X11DRV_check_error(void);
extern BOOL is_window_managed( HWND hwnd, const RECT *window_rect );
extern BOOL is_window_managed( HWND hwnd, UINT swp_flags, const RECT *window_rect );
extern void X11DRV_set_iconic_state( HWND hwnd );
extern void X11DRV_window_to_X_rect( struct x11drv_win_data *data, RECT *rect );
extern void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect );