From: Rémi Bernon rbernon@codeweavers.com
--- dlls/winex11.drv/window.c | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c index 6278fa651e7..3b7132dd53d 100644 --- a/dlls/winex11.drv/window.c +++ b/dlls/winex11.drv/window.c @@ -2875,16 +2875,6 @@ BOOL X11DRV_WindowPosChanging( HWND hwnd, UINT swp_flags, BOOL shaped, const str if (!data && !(data = X11DRV_create_win_data( hwnd, rects ))) return FALSE; /* use default surface */ data->shaped = shaped;
- /* check if we need to switch the window to managed */ - if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, &rects->window )) - { - UINT wm_state = data->desired_state.wm_state; - TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window ); - window_set_wm_state( data, WithdrawnState ); - data->managed = TRUE; - window_set_wm_state( data, wm_state ); - } - ret = !!data->whole_window; /* use default surface if we don't have a window */ release_win_data( data );
@@ -2958,6 +2948,16 @@ void X11DRV_WindowPosChanged( HWND hwnd, HWND insert_after, HWND owner_hint, UIN
if (!(data = get_win_data( hwnd ))) return;
+ /* check if we need to switch the window to managed */ + if (!data->managed && data->whole_window && is_window_managed( hwnd, swp_flags, &new_rects->window )) + { + UINT wm_state = data->desired_state.wm_state; + TRACE( "making win %p/%lx managed\n", hwnd, data->whole_window ); + window_set_wm_state( data, WithdrawnState ); + data->managed = TRUE; + window_set_wm_state( data, wm_state ); + } + old_style = new_style & ~(WS_VISIBLE | WS_MINIMIZE | WS_MAXIMIZE); if (data->desired_state.wm_state != WithdrawnState) old_style |= WS_VISIBLE; if (data->desired_state.wm_state == IconicState) old_style |= WS_MINIMIZE;