Author: fireball Date: Sat Jul 3 20:56:49 2010 New Revision: 47932
URL: http://svn.reactos.org/svn/reactos?rev=47932&view=rev Log: - Pass window styles to SWM when adding a window. - Fix a debug print showing wrong previous hwnd value in SwmWindowPosChanged.
Modified: branches/arwinss/reactos/dll/win32/winent.drv/wnd.c branches/arwinss/reactos/include/reactos/win32k/rosuser.h branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db
Modified: branches/arwinss/reactos/dll/win32/winent.drv/wnd.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winent... ============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/wnd.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/wnd.c [iso-8859-1] Sat Jul 3 20:56:49 2010 @@ -73,6 +73,7 @@ struct ntdrv_win_data *NTDRV_create_win_data( HWND hwnd ) { struct ntdrv_win_data *data; + DWORD style, ex_style; HWND parent;
if (!(parent = GetAncestor( hwnd, GA_PARENT ))) return NULL; /* desktop */ @@ -99,8 +100,11 @@ hwnd, wine_dbgstr_rect( &data->window_rect ), wine_dbgstr_rect( &data->whole_rect ), wine_dbgstr_rect( &data->client_rect ));
+ style = GetWindowLongW( data->hwnd, GWL_STYLE ); + ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); + /* Inform window manager about window rect in screen coords */ - SwmAddWindow(hwnd, &data->window_rect); + SwmAddWindow(hwnd, &data->window_rect, style, ex_style); data->whole_window = (PVOID)1; }
Modified: branches/arwinss/reactos/include/reactos/win32k/rosuser.h URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/reactos/... ============================================================================== --- branches/arwinss/reactos/include/reactos/win32k/rosuser.h [iso-8859-1] (original) +++ branches/arwinss/reactos/include/reactos/win32k/rosuser.h [iso-8859-1] Sat Jul 3 20:56:49 2010 @@ -168,7 +168,7 @@ RosUserConnectCsrss(VOID);
VOID NTAPI -SwmAddWindow(HWND hWnd, RECT *WindowRect); +SwmAddWindow(HWND hWnd, RECT *WindowRect, DWORD style, DWORD ex_style);
VOID NTAPI SwmAddDesktopWindow(HWND hWnd, UINT Width, UINT Height);
Modified: branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c [iso-8859-1] Sat Jul 3 20:56:49 2010 @@ -338,15 +338,19 @@
VOID NTAPI -SwmAddWindow(HWND hWnd, RECT *WindowRect) +SwmAddWindow(HWND hWnd, RECT *WindowRect, DWORD style, DWORD ex_style) { PSWM_WINDOW Win;
DPRINT("SwmAddWindow %x\n", hWnd); - DPRINT("rect (%d,%d)-(%d,%d)\n", WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom); + DPRINT("rect (%d,%d)-(%d,%d), style %x, ex_style %x\n", + WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom, + style, ex_style);
/* Acquire the lock */ SwmAcquire(); + + if (ex_style & WS_EX_TOPMOST) DPRINT1("Creating a topmost window, ignoring\n");
/* Allocate entry */ Win = ExAllocatePool(PagedPool, sizeof(SWM_WINDOW)); @@ -667,7 +671,10 @@ if (hWndAfter && !(SwpFlags & SWP_NOZORDER)) { /* Get the previous window */ - SwmPrev = CONTAINING_RECORD(SwmWin->Entry.Blink, SWM_WINDOW, Entry); + if (SwmWin->Entry.Blink != &SwmWindows) + SwmPrev = CONTAINING_RECORD(SwmWin->Entry.Blink, SWM_WINDOW, Entry); + else + SwmPrev = SwmWin;
/* Check if they are different */ if (SwmPrev->hwnd != hWndAfter)
Modified: branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db URL: http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win32... ============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Sat Jul 3 20:56:49 2010 @@ -84,7 +84,7 @@ RosUserToUnicodeEx 7 RosUserMapVirtualKeyEx 4 RosUserGetAsyncKeyState 1 -SwmAddWindow 2 +SwmAddWindow 4 SwmAddDesktopWindow 3 SwmRemoveWindow 1 SwmSetForeground 1