Map a window if it is shown by a direct style change.

This commit is contained in:
Gerard Patel 2001-10-03 18:44:02 +00:00 committed by Alexandre Julliard
parent e35f4ee144
commit 94ce2a3303
6 changed files with 32 additions and 0 deletions

View File

@ -98,6 +98,7 @@ static BOOL load_driver(void)
GET_USER_FUNC(SetWindowPos);
GET_USER_FUNC(SetWindowRgn);
GET_USER_FUNC(SetWindowIcon);
GET_USER_FUNC(SetWindowStyle);
GET_USER_FUNC(SetWindowText);
GET_USER_FUNC(ShowWindow);
GET_USER_FUNC(SysCommandSizeMove);

View File

@ -684,6 +684,29 @@ static BOOL fixup_flags( WINDOWPOS *winpos )
}
/***********************************************************************
* SetWindowStyle (X11DRV.@)
*
* Update the X state of a window to reflect a style change
*/
void X11DRV_SetWindowStyle( HWND hwnd, LONG oldStyle )
{
Display *display = thread_display();
WND *wndPtr = WIN_FindWndPtr( hwnd );
if (!wndPtr) return;
if ((wndPtr->dwStyle & WS_VISIBLE) && (!(oldStyle & WS_VISIBLE)))
{
if (!IsRectEmpty( &wndPtr->rectWindow ))
{
TRACE( "mapping win %x\n", hwnd );
TSXMapWindow( display, get_whole_window(wndPtr) );
}
}
WIN_ReleaseWndPtr(wndPtr);
}
/***********************************************************************
* SetWindowPos (X11DRV.@)
*/

View File

@ -90,6 +90,7 @@ debug_channels (bitblt bitmap clipboard cursor dinput event font gdi graphics
@ cdecl SetWindowPos(ptr) X11DRV_SetWindowPos
@ cdecl SetWindowRgn(long long long) X11DRV_SetWindowRgn
@ cdecl SetWindowIcon(long long long) X11DRV_SetWindowIcon
@ cdecl SetWindowStyle(ptr long) X11DRV_SetWindowStyle
@ cdecl SetWindowText(long wstr) X11DRV_SetWindowText
@ cdecl ShowWindow(long long) X11DRV_ShowWindow
@ cdecl SysCommandSizeMove(long long) X11DRV_SysCommandSizeMove

View File

@ -83,6 +83,7 @@ typedef struct tagUSER_DRIVER {
BOOL (*pSetWindowPos)(WINDOWPOS *);
BOOL (*pSetWindowRgn)(HWND,HRGN,BOOL);
HICON (*pSetWindowIcon)(HWND,HICON,BOOL);
void (*pSetWindowStyle)(HWND,DWORD);
BOOL (*pSetWindowText)(HWND,LPCWSTR);
BOOL (*pShowWindow)(HWND,INT);
void (*pSysCommandSizeMove)(HWND,WPARAM);

View File

@ -169,6 +169,8 @@ static void DEFWND_SetRedraw( HWND hwnd, WPARAM wParam )
if( !bVisible )
{
wndPtr->dwStyle |= WS_VISIBLE;
if (USER_Driver.pSetWindowStyle)
USER_Driver.pSetWindowStyle( hwnd, wndPtr->dwStyle & ~WS_VISIBLE );
DCE_InvalidateDCE( hwnd, &wndPtr->rectWindow );
}
}
@ -180,6 +182,8 @@ static void DEFWND_SetRedraw( HWND hwnd, WPARAM wParam )
RedrawWindow( hwnd, NULL, 0, wParam );
DCE_InvalidateDCE( hwnd, &wndPtr->rectWindow );
wndPtr->dwStyle &= ~WS_VISIBLE;
if (USER_Driver.pSetWindowStyle)
USER_Driver.pSetWindowStyle( hwnd, wndPtr->dwStyle | WS_VISIBLE );
}
WIN_ReleaseWndPtr( wndPtr );
}

View File

@ -1762,10 +1762,12 @@ static LONG WIN_SetWindowLong( HWND hwnd, INT offset, LONG newval,
type, WIN_PROC_WINDOW );
goto end;
case GWL_STYLE:
retval = wndPtr->dwStyle;
style.styleOld = wndPtr->dwStyle;
style.styleNew = newval;
SendMessageA(hwnd,WM_STYLECHANGING,GWL_STYLE,(LPARAM)&style);
wndPtr->dwStyle = style.styleNew;
if (USER_Driver.pSetWindowStyle) USER_Driver.pSetWindowStyle( hwnd, retval );
SendMessageA(hwnd,WM_STYLECHANGED,GWL_STYLE,(LPARAM)&style);
retval = style.styleOld;
goto end;