Module: wine Branch: refs/heads/master Commit: 1625b385c8011ebda63c0790fd9edb14f403d619 URL: http://source.winehq.org/git/?p=wine.git;a=commit;h=1625b385c8011ebda63c0790...
Author: Alexandre Julliard julliard@winehq.org Date: Mon Mar 27 21:45:47 2006 +0200
x11drv: Support SetWindowPos and ShowWindow on the desktop window.
---
dlls/x11drv/winpos.c | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/dlls/x11drv/winpos.c b/dlls/x11drv/winpos.c index 96b1004..331d6d4 100644 --- a/dlls/x11drv/winpos.c +++ b/dlls/x11drv/winpos.c @@ -133,7 +133,8 @@ static BOOL SWP_DoWinPosChanging( WINDOW if (!(pWinpos->flags & SWP_NOSENDCHANGING)) SendMessageW( pWinpos->hwnd, WM_WINDOWPOSCHANGING, 0, (LPARAM)pWinpos );
- if (!(wndPtr = WIN_GetPtr( pWinpos->hwnd )) || wndPtr == WND_OTHER_PROCESS) return FALSE; + if (!(wndPtr = WIN_GetPtr( pWinpos->hwnd )) || + wndPtr == WND_OTHER_PROCESS || wndPtr == WND_DESKTOP) return FALSE;
/* Calculate new position and size */
@@ -695,9 +696,6 @@ BOOL X11DRV_SetWindowPos( WINDOWPOS *win orig_flags = winpos->flags; winpos->flags &= ~SWP_WINE_NOHOSTMOVE;
- /* Check window handle */ - if (winpos->hwnd == GetDesktopWindow()) return FALSE; - /* First make sure that coordinates are valid for WM_WINDOWPOSCHANGING */ if (!(winpos->flags & SWP_NOMOVE)) { @@ -936,6 +934,7 @@ UINT WINPOS_MinMaximize( HWND hwnd, UINT BOOL X11DRV_ShowWindow( HWND hwnd, INT cmd ) { WND *wndPtr; + HWND parent; LONG style = GetWindowLongW( hwnd, GWL_STYLE ); BOOL wasVisible = (style & WS_VISIBLE) != 0; BOOL showFlag = TRUE; @@ -1004,7 +1003,8 @@ BOOL X11DRV_ShowWindow( HWND hwnd, INT c if (!IsWindow( hwnd )) return wasVisible; }
- if (!IsWindowVisible( GetAncestor( hwnd, GA_PARENT ))) + parent = GetAncestor( hwnd, GA_PARENT ); + if (parent && !IsWindowVisible( parent )) { /* if parent is not visible simply toggle WS_VISIBLE and return */ if (showFlag) WIN_SetStyle( hwnd, WS_VISIBLE, 0 );