ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2011
----- 2024 -----
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
20 participants
336 discussions
Start a n
N
ew thread
[akhaldi] 50324: [CMAKE] - Fix delayimp dependency.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 8 13:19:38 2011 New Revision: 50324 URL:
http://svn.reactos.org/svn/reactos?rev=50324&view=rev
Log: [CMAKE] - Fix delayimp dependency. Modified: branches/cmake-bringup/lib/sdk/delayimp/CMakeLists.txt Modified: branches/cmake-bringup/lib/sdk/delayimp/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/sdk/delayimp/…
============================================================================== --- branches/cmake-bringup/lib/sdk/delayimp/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/lib/sdk/delayimp/CMakeLists.txt [iso-8859-1] Sat Jan 8 13:19:38 2011 @@ -1,3 +1,4 @@ add_definitions(-DUNICODE -D_UNICODE) add_library(delayimp delayimp.c) +add_dependencies(delayimp psdk)
13 years, 10 months
1
0
0
0
[akhaldi] 50323: [CMAKE] - Fix dnslib dependency.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 8 13:14:25 2011 New Revision: 50323 URL:
http://svn.reactos.org/svn/reactos?rev=50323&view=rev
Log: [CMAKE] - Fix dnslib dependency. Modified: branches/cmake-bringup/lib/dnslib/CMakeLists.txt Modified: branches/cmake-bringup/lib/dnslib/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/dnslib/CMakeL…
============================================================================== --- branches/cmake-bringup/lib/dnslib/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/lib/dnslib/CMakeLists.txt [iso-8859-1] Sat Jan 8 13:14:25 2011 @@ -23,3 +23,4 @@ utf8.c) add_library(dnslib ${SOURCE}) +add_dependencies(dnslib psdk)
13 years, 10 months
1
0
0
0
[akhaldi] 50322: [CMAKE] - Fix a missing dependency.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 8 13:00:35 2011 New Revision: 50322 URL:
http://svn.reactos.org/svn/reactos?rev=50322&view=rev
Log: [CMAKE] - Fix a missing dependency. Modified: branches/cmake-bringup/drivers/bus/acpi/CMakeLists.txt Modified: branches/cmake-bringup/drivers/bus/acpi/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/bus/acpi/…
============================================================================== --- branches/cmake-bringup/drivers/bus/acpi/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/drivers/bus/acpi/CMakeLists.txt [iso-8859-1] Sat Jan 8 13:00:35 2011 @@ -122,6 +122,7 @@ acpica/utilities/utxface.c) set_target_properties(acpica PROPERTIES COMPILE_DEFINITIONS "ACPI_USE_LOCAL_CACHE") +add_dependencies(acpica bugcodes) add_library(acpi SHARED busmgr/bus.c
13 years, 10 months
1
0
0
0
[tkreuzer] 50321: [GDI32] Implement GdiGetDcAttr. Just for convenience / cleaner code.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Sat Jan 8 12:19:23 2011 New Revision: 50321 URL:
http://svn.reactos.org/svn/reactos?rev=50321&view=rev
Log: [GDI32] Implement GdiGetDcAttr. Just for convenience / cleaner code. Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h Modified: trunk/reactos/dll/win32/gdi32/include/gdi32p.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/gdi32/include/gd…
============================================================================== --- trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/gdi32/include/gdi32p.h [iso-8859-1] Sat Jan 8 12:19:23 2011 @@ -379,4 +379,14 @@ return pHdr; } +FORCEINLINE +PDC_ATTR +GdiGetDcAttr(HDC hdc) +{ + PDC_ATTR pdcattr; + + if (!GdiGetHandleUserData((HGDIOBJ)hdc, GDI_OBJECT_TYPE_DC, (PVOID*)&pdcattr)) return NULL; + return pdcattr; +} + /* EOF */
13 years, 10 months
1
0
0
0
[akhaldi] 50320: [CMAKE] - Add -fshort-wchar to host tools
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sat Jan 8 11:52:58 2011 New Revision: 50320 URL:
http://svn.reactos.org/svn/reactos?rev=50320&view=rev
Log: [CMAKE] - Add -fshort-wchar to host tools Modified: branches/cmake-bringup/CMakeLists.txt branches/cmake-bringup/gcc.cmake Modified: branches/cmake-bringup/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
============================================================================== --- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Sat Jan 8 11:52:58 2011 @@ -17,6 +17,8 @@ if(NOT CMAKE_CROSSCOMPILING) + add_definitions(-fshort-wchar) + add_definitions(-DTARGET_${ARCH}) if(ARCH MATCHES i386) @@ -51,14 +53,14 @@ set(IMPORT_EXECUTABLES "${REACTOS_BUILD_TOOLS_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Host executables") include(${IMPORT_EXECUTABLES}) -endif(NOT CMAKE_CROSSCOMPILING) +endif() # Compiler specific definitions and macros if(MSVC) include(msc.cmake) else() include(gcc.cmake) -endif(MSVC) +endif() # Generic macros include(CMakeMacros.cmake) Modified: branches/cmake-bringup/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/gcc.cmake?rev=503…
============================================================================== --- branches/cmake-bringup/gcc.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/gcc.cmake [iso-8859-1] Sat Jan 8 11:52:58 2011 @@ -1,9 +1,5 @@ -if(NOT CMAKE_CROSSCOMPILING) - -add_definitions(-fshort-wchar) - -else() +if(CMAKE_CROSSCOMPILING) # Linking link_directories("${REACTOS_SOURCE_DIR}/importlibs" ${REACTOS_BINARY_DIR}/lib/3rdparty/mingw)
13 years, 10 months
1
0
0
0
[fireball] 50319: [HEAP] - Peer review rocks.
by fireball@svn.reactos.org
Author: fireball Date: Sat Jan 8 11:32:55 2011 New Revision: 50319 URL:
http://svn.reactos.org/svn/reactos?rev=50319&view=rev
Log: [HEAP] - Peer review rocks. Modified: trunk/reactos/lib/rtl/heap.c Modified: trunk/reactos/lib/rtl/heap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heap.c?rev=50319&r…
============================================================================== --- trunk/reactos/lib/rtl/heap.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/heap.c [iso-8859-1] Sat Jan 8 11:32:55 2011 @@ -2344,7 +2344,6 @@ /* Release the heap lock */ if (Locked) RtlLeaveHeapLock(Heap->LockVariable); - DbgBreakPoint(); return FALSE; }
13 years, 10 months
1
0
0
0
[fireball] 50318: - Forgot to commit this file, related to SWM interface changes.
by fireball@svn.reactos.org
Author: fireball Date: Sat Jan 8 11:24:57 2011 New Revision: 50318 URL:
http://svn.reactos.org/svn/reactos?rev=50318&view=rev
Log: - Forgot to commit this file, related to SWM interface changes. Modified: branches/arwinss/reactos/include/reactos/wine/rosuser.h Modified: branches/arwinss/reactos/include/reactos/wine/rosuser.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/reactos…
============================================================================== --- branches/arwinss/reactos/include/reactos/wine/rosuser.h [iso-8859-1] (original) +++ branches/arwinss/reactos/include/reactos/wine/rosuser.h [iso-8859-1] Sat Jan 8 11:24:57 2011 @@ -13,9 +13,13 @@ /* DEFINES *******************************************************************/ +#define SWM_ROOT_WINDOW_ID 1 + /* ENUMERATIONS **************************************************************/ /* TYPES *********************************************************************/ + +typedef ULONG_PTR GR_WINDOW_ID; /* FUNCTIONS *****************************************************************/ @@ -173,28 +177,25 @@ BOOL NTAPI RosUserBuildShellHookHwndList(HWND *list, UINT *cbSize); -VOID NTAPI -SwmAddWindow(HWND hWnd, RECT *WindowRect, DWORD style, DWORD ex_style); +GR_WINDOW_ID NTAPI +SwmNewWindow(GR_WINDOW_ID parent, RECT *WindowRect, HWND hWnd, DWORD ex_style); VOID NTAPI SwmAddDesktopWindow(HWND hWnd, UINT Width, UINT Height); VOID NTAPI -SwmRemoveWindow(HWND hWnd); +SwmDestroyWindow(GR_WINDOW_ID Wid); VOID NTAPI SwmSetForeground(HWND hWnd); VOID NTAPI -SwmPosChanging(HWND hWnd, const RECT *WindowRect); - -VOID NTAPI -SwmPosChanged(HWND hWnd, const RECT *WindowRect, const RECT *OldRect, HWND hWndAfter, UINT SwpFlags); +SwmPosChanged(GR_WINDOW_ID Wid, const RECT *WindowRect, const RECT *OldRect, HWND hWndAfter, UINT SwpFlags); HWND NTAPI SwmGetWindowFromPoint(LONG x, LONG y); VOID NTAPI -SwmShowWindow(HWND hWnd, BOOLEAN Show, UINT SwpFlags); +SwmShowWindow(GR_WINDOW_ID Wid, BOOLEAN Show, UINT SwpFlags); #endif /* __WIN32K_NTUSER_H */
13 years, 10 months
1
0
0
0
[gadamopoulos] 50317: [winent] - Move implementation of handle mapping to user mode. [win32k] - Remove handle mappings from win32k. Now win32k manages only its own handles
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Sat Jan 8 08:57:15 2011 New Revision: 50317 URL:
http://svn.reactos.org/svn/reactos?rev=50317&view=rev
Log: [winent] - Move implementation of handle mapping to user mode. [win32k] - Remove handle mappings from win32k. Now win32k manages only its own handles Modified: branches/arwinss/reactos/dll/win32/winent.drv/dib.c branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c branches/arwinss/reactos/dll/win32/winent.drv/main.c branches/arwinss/reactos/dll/win32/winent.drv/mouse.c branches/arwinss/reactos/dll/win32/winent.drv/winent.h branches/arwinss/reactos/include/reactos/wine/ntrosgdi.h branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c branches/arwinss/reactos/subsystems/win32/win32k/main/init.c branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db Modified: branches/arwinss/reactos/dll/win32/winent.drv/dib.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/dib.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/dib.c [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -173,6 +173,8 @@ } } + hbitmap = (HBITMAP)MapUserHandle(hbitmap); + result = RosGdiSetDIBits(physDev->hKernelDC, hbitmap, startscan, lines, safeBits, info, coloruse); @@ -192,6 +194,8 @@ /* Check if this bitmap has a DIB section */ if (!(obj_size = GetObjectW( hbitmap, sizeof(dib), &dib ))) return 0; + hbitmap = (HBITMAP)MapUserHandle(hbitmap); + /* Perform GetDIBits */ return RosGdiGetDIBits(physDev->hKernelDC, hbitmap, startscan, lines, bits, info, coloruse, &dib); } @@ -202,6 +206,7 @@ DIBSECTION dib; LONG height, width; WORD infoBpp, compression; + HBITMAP hKbitmap; GetObjectW( hbitmap, sizeof(dib), &dib ); @@ -212,7 +217,11 @@ // TODO: Should pass as a flag instead if (height < 0) dib.dsBmih.biHeight *= -1; - return RosGdiCreateDIBSection(physDev->hKernelDC, hbitmap, bmi, usage, &dib); + hKbitmap = RosGdiCreateDIBSection(physDev->hKernelDC, bmi, usage, &dib); + + AddHandleMapping(hKbitmap, hbitmap); + + return hbitmap; } UINT CDECL RosDrv_SetDIBColorTable( NTDRV_PDEVICE *physDev, UINT start, UINT count, const RGBQUAD *colors ) Modified: branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/gdidrv.c [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -15,12 +15,89 @@ /* GLOBALS ****************************************************************/ HANDLE hStockBitmap; +static struct list handle_mapping_list = LIST_INIT( handle_mapping_list ); +static CRITICAL_SECTION handle_mapping_cs; + +typedef struct _HMAPPING +{ + HGDIOBJ hUser; + HGDIOBJ hKernel; + struct list entry; +} HMAPPING, *PHMAPPING; /* FUNCTIONS **************************************************************/ +VOID InitHandleMapping() +{ + InitializeCriticalSection(&handle_mapping_cs); +} + +VOID AddHandleMapping(HGDIOBJ hKernel, HGDIOBJ hUser) +{ + PHMAPPING mapping = HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY, sizeof(HMAPPING)); + if(!mapping) + return; + + mapping->hKernel = hKernel; + mapping->hUser = hUser; + + EnterCriticalSection(&handle_mapping_cs); + list_add_tail(&handle_mapping_list, &mapping->entry); + LeaveCriticalSection(&handle_mapping_cs); +} + +static PHMAPPING FindHandleMapping(HGDIOBJ hUser) +{ + PHMAPPING item; + + LIST_FOR_EACH_ENTRY( item, &handle_mapping_list, HMAPPING, entry ) + { + if (item->hUser == hUser) + { + return item; + } + } + + return NULL; +} + +HGDIOBJ MapUserHandle(HGDIOBJ hUser) +{ + PHMAPPING mapping; + + mapping = FindHandleMapping(hUser); + + return mapping ? mapping->hKernel : NULL; +} + +VOID RemoveHandleMapping(HGDIOBJ hUser) +{ + PHMAPPING mapping; + + mapping = FindHandleMapping(hUser); + if(mapping == NULL) + return; + + EnterCriticalSection(&handle_mapping_cs); + list_remove(&mapping->entry); + LeaveCriticalSection(&handle_mapping_cs); +} + +VOID CleanupHandleMapping() +{ + PHMAPPING mapping; + + while(!list_empty(&handle_mapping_list)) + { + mapping = LIST_ENTRY(list_head(&handle_mapping_list), HMAPPING, entry); + RemoveHandleMapping(mapping->hUser); + } +} + BOOL CDECL RosDrv_CreateBitmap( NTDRV_PDEVICE *physDev, HBITMAP hbitmap, LPVOID bmBits ) { BITMAP bitmap; + HBITMAP hKbitmap; /* Get the usermode object */ if (!GetObjectW(hbitmap, sizeof(bitmap), &bitmap)) return FALSE; @@ -29,7 +106,13 @@ if (bitmap.bmPlanes != 1) return FALSE; /* Create the kernelmode bitmap object */ - return RosGdiCreateBitmap(physDev->hKernelDC, hbitmap, &bitmap, bmBits); + hKbitmap = RosGdiCreateBitmap(physDev->hKernelDC, &bitmap, bmBits); + + if(!hKbitmap) + return FALSE; + + AddHandleMapping(hKbitmap, hbitmap); + return TRUE; } BOOL CDECL RosDrv_CreateDC( HDC hdc, NTDRV_PDEVICE **pdev, LPCWSTR driver, LPCWSTR device, @@ -73,7 +156,14 @@ BOOL CDECL RosDrv_DeleteBitmap( HBITMAP hbitmap ) { - return RosGdiDeleteBitmap(hbitmap); + HBITMAP hKbitmap = (HBITMAP)MapUserHandle(hbitmap); + + if(hKbitmap == NULL) + return FALSE; + + RemoveHandleMapping(hbitmap); + + return RosGdiDeleteBitmap(hKbitmap); } BOOL CDECL RosDrv_DeleteDC( NTDRV_PDEVICE *physDev ) @@ -134,6 +224,8 @@ LONG CDECL RosDrv_GetBitmapBits( HBITMAP hbitmap, void *buffer, LONG count ) { + hbitmap = (HBITMAP)MapUserHandle(hbitmap); + return RosGdiGetBitmapBits(hbitmap, buffer, count); } @@ -184,7 +276,10 @@ BOOL bRes, bStock = FALSE; /* Check if it's a stock bitmap */ - if (hbitmap == hStockBitmap) bStock = TRUE; + if (hbitmap == hStockBitmap) + bStock = TRUE; + else + hbitmap = (HBITMAP)MapUserHandle(hbitmap); /* Select the bitmap into the DC */ bRes = RosGdiSelectBitmap(physDev->hKernelDC, hbitmap, bStock); @@ -201,6 +296,9 @@ LOGBRUSH logbrush; if (!GetObjectA( hbrush, sizeof(logbrush), &logbrush )) return 0; + + if(logbrush.lbStyle == BS_PATTERN) + logbrush.lbHatch = (ULONG_PTR)MapUserHandle((HBITMAP)logbrush.lbHatch); RosGdiSelectBrush(physDev->hKernelDC, &logbrush); Modified: branches/arwinss/reactos/dll/win32/winent.drv/main.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/main.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/main.c [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -69,12 +69,14 @@ case DLL_PROCESS_ATTACH: InitializeCriticalSection(&NTDRV_CritSection); NTDRV_InitClipboard(); + InitHandleMapping(); //ret = process_attach(); break; case DLL_THREAD_DETACH: //thread_detach(); break; case DLL_PROCESS_DETACH: + CleanupHandleMapping(); //process_detach(); break; } Modified: branches/arwinss/reactos/dll/win32/winent.drv/mouse.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/mouse.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/mouse.c [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -382,12 +382,12 @@ if(handle == NULL) { RosUserSetCursor(NULL); - - // FIXME: Delete previously created (by GetIconInfo) bitmaps! } else { GetIconInfo(handle, &iconinfo); + iconinfo.hbmColor = (HBITMAP)MapUserHandle(iconinfo.hbmColor); + iconinfo.hbmMask = (HBITMAP)MapUserHandle(iconinfo.hbmMask); RosUserSetCursor(&iconinfo); } } Modified: branches/arwinss/reactos/dll/win32/winent.drv/winent.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/winent.h [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/winent.h [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -98,6 +98,11 @@ /* clipboard.c */ void NTDRV_InitClipboard(void); +VOID InitHandleMapping(); +VOID AddHandleMapping(HGDIOBJ hKernel, HGDIOBJ hUser); +HGDIOBJ MapUserHandle(HGDIOBJ hUser); +VOID RemoveHandleMapping(HGDIOBJ hUser); +VOID CleanupHandleMapping(); /* gdidrv.c */ void CDECL RosDrv_SetDeviceClipping( NTDRV_PDEVICE *physDev, HRGN vis_rgn, HRGN clip_rgn ); @@ -105,6 +110,8 @@ /* graphics.c */ INT RosDrv_XWStoDS( NTDRV_PDEVICE *physDev, INT width ); INT RosDrv_YWStoDS( NTDRV_PDEVICE *physDev, INT height ); + +HGDIOBJ MapHandle(HGDIOBJ hUser); /* font.c */ VOID Modified: branches/arwinss/reactos/include/reactos/wine/ntrosgdi.h URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/include/reactos…
============================================================================== --- branches/arwinss/reactos/include/reactos/wine/ntrosgdi.h [iso-8859-1] (original) +++ branches/arwinss/reactos/include/reactos/wine/ntrosgdi.h [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -64,8 +64,8 @@ BOOL APIENTRY RosGdiBitBlt( HDC physDevDst, INT xDst, INT yDst, INT width, INT height, HDC physDevSrc, INT xSrc, INT ySrc, DWORD rop ); -BOOL APIENTRY RosGdiCreateBitmap( HDC physDev, HBITMAP hBitmap, BITMAP *pBitmap, LPVOID bmBits ); -HBITMAP APIENTRY RosGdiCreateDIBSection( HDC physDev, HBITMAP hbitmap, +HBITMAP APIENTRY RosGdiCreateBitmap( HDC physDev, BITMAP *pBitmap, LPVOID bmBits ); +HBITMAP APIENTRY RosGdiCreateDIBSection( HDC physDev, const BITMAPINFO *bmi, UINT usage, DIBSECTION *dib ); BOOL APIENTRY RosGdiDeleteBitmap( HBITMAP hbitmap ); LONG APIENTRY RosGdiGetBitmapBits( HBITMAP hbitmap, void *buffer, LONG count ); Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/bitmap.c [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -68,7 +68,7 @@ return bRes; } -BOOL APIENTRY RosGdiCreateBitmap( HDC physDev, HBITMAP hUserBitmap, BITMAP *pBitmap, LPVOID bmBits ) +HBITMAP APIENTRY RosGdiCreateBitmap( HDC physDev, BITMAP *pBitmap, LPVOID bmBits ) { HBITMAP hBitmap; SIZEL slSize; @@ -97,7 +97,7 @@ NULL); /* Return failure if no bitmap was created */ - if (!hBitmap) return FALSE; + if (!hBitmap) return 0; /* Set its bits if any */ if (bmBits) @@ -112,16 +112,13 @@ SURFACE_UnlockSurface(pSurface); } - /* Map handles */ - GDI_AddHandleMapping(hBitmap, hUserBitmap); - - DPRINT("Created bitmap %x (user handle %x)\n", hBitmap, hUserBitmap); + DPRINT("Created bitmap %x \n", hBitmap); /* Indicate success */ - return TRUE; -} - -HBITMAP APIENTRY RosGdiCreateDIBSection( HDC physDev, HBITMAP hbitmap, + return hBitmap; +} + +HBITMAP APIENTRY RosGdiCreateDIBSection( HDC physDev, const BITMAPINFO *bmi, UINT usage, DIBSECTION *dib ) { SIZEL szSize; @@ -192,27 +189,16 @@ ExFreePoolWithTag(lpRGB, TAG_COLORMAP); } - /* Map handles */ - GDI_AddHandleMapping(hbmDIB, hbitmap); - - DPRINT("Created bitmap %x (user handle %x) for DIB section\n", hbmDIB, hbitmap); + DPRINT("Created bitmap %x for DIB section\n", hbmDIB); /* Return success */ - return hbitmap; + return hbmDIB; } BOOL APIENTRY RosGdiDeleteBitmap( HBITMAP hbitmap ) { - HGDIOBJ hKernel = GDI_MapUserHandle(hbitmap); - - /* Fail if this object doesn't exist */ - if (!hKernel) return FALSE; - - /* Delete U->K mapping */ - GDI_RemoveHandleMapping(hbitmap); - /* Delete the bitmap */ - GreDeleteObject(hKernel); + GreDeleteObject(hbitmap); /* Indicate success */ return TRUE; @@ -222,23 +208,13 @@ { PSURFACE psurf; LONG bmSize, ret; - HGDIOBJ hKernel; if (buffer != NULL && Bytes == 0) { return 0; } - /* Get kernelmode bitmap handle */ - hKernel = GDI_MapUserHandle(hbitmap); - - if (!hKernel) - { - DPRINT1("Trying to GetBitmapBits of an unkown bitmap (uhandle %x)\n", hbitmap); - return 0; - } - - psurf = SURFACE_LockSurface(hKernel); + psurf = SURFACE_LockSurface(hbitmap); if (!psurf) return 0; bmSize = BITMAP_GetWidthBytes(psurf->SurfObj.sizlBitmap.cx, @@ -264,18 +240,16 @@ return ret; } -INT APIENTRY RosGdiGetDIBits( HDC physDev, HBITMAP hUserBitmap, UINT StartScan, UINT ScanLines, +INT APIENTRY RosGdiGetDIBits( HDC physDev, HBITMAP hBitmap, UINT StartScan, UINT ScanLines, LPVOID Bits, BITMAPINFO *bmi, UINT ColorUse, DIBSECTION *dib ) { PDC pDC; - HGDIOBJ hBitmap = GDI_MapUserHandle(hUserBitmap); - /* Get a pointer to the DCs */ pDC = DC_LockDc(physDev); - DPRINT("RosGdiGetDIBits for bitmap %x (user handle %x), StartScan %d, ScanLines %d, height %d\n", - hBitmap, hUserBitmap, StartScan, ScanLines, dib->dsBm.bmHeight); + DPRINT("RosGdiGetDIBits for bitmap %x , StartScan %d, ScanLines %d, height %d\n", + hBitmap, StartScan, ScanLines, dib->dsBm.bmHeight); /* Set the bits */ GreGetDIBits(pDC, @@ -365,18 +339,16 @@ return Entries; } -INT APIENTRY RosGdiSetDIBits(HDC physDev, HBITMAP hUserBitmap, UINT StartScan, +INT APIENTRY RosGdiSetDIBits(HDC physDev, HBITMAP hBitmap, UINT StartScan, UINT ScanLines, LPCVOID Bits, const BITMAPINFO *bmi, UINT ColorUse) { PDC pDC; - HGDIOBJ hBitmap = GDI_MapUserHandle(hUserBitmap); - /* Get a pointer to the DCs */ pDC = DC_LockDc(physDev); - DPRINT("RosGdiSetDIBits for bitmap %x (user handle %x), StartScan %d, ScanLines %d\n", - hBitmap, hUserBitmap, StartScan, ScanLines); + DPRINT("RosGdiSetDIBits for bitmap %x, StartScan %d, ScanLines %d\n", + hBitmap, StartScan, ScanLines); /* Set the bits */ ScanLines = GreSetDIBits(pDC, Modified: branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gdi/dc.c [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -156,29 +156,24 @@ { PDC pDC; PSURFACE pSurface; - HGDIOBJ hBmpKern; + + DPRINT("Selecting %x bitmap to hdc %x\n", hbitmap, physDev); if (bStock) { /* Selecting stock bitmap */ - hBmpKern = hStockBmp; - } - else - { - /* Selecting usual bitmap */ - hBmpKern = GDI_MapUserHandle(hbitmap); - if (!hBmpKern) - { - DPRINT1("Trying to select an unknown bitmap %x to the DC %x!\n", hbitmap, physDev); - return FALSE; - } - } - - DPRINT("Selecting %x bitmap to hdc %x\n", hBmpKern, physDev); + hbitmap = hStockBmp; + } + + pSurface = SURFACE_ShareLockSurface(hbitmap); + if(pSurface== NULL) + { + DPRINT1("SURFACE_ShareLockSurface failed\n"); + return FALSE; + } /* Get a pointer to the DC and the bitmap*/ pDC = DC_LockDc(physDev); - pSurface = SURFACE_ShareLockSurface(hBmpKern); /* Release the old bitmap */ SURFACE_ShareUnlockSurface(pDC->dclevel.pSurface); @@ -200,8 +195,6 @@ HBRUSH APIENTRY GreCreateBrush(LOGBRUSH *pLogBrush) { - HGDIOBJ hBmpKern; - /* Create the brush */ switch(pLogBrush->lbStyle) { @@ -212,14 +205,8 @@ case BS_HATCHED: return GreCreateHatchBrush(pLogBrush->lbHatch, pLogBrush->lbColor); case BS_PATTERN: - hBmpKern = GDI_MapUserHandle((HBITMAP)pLogBrush->lbHatch); - if (!hBmpKern) - { - DPRINT1("Trying to create a pattern brush with an unknown bitmap %x !\n", pLogBrush->lbHatch); - return NULL; - } - GDIOBJ_SetOwnership(hBmpKern, NULL); - return GreCreatePatternBrush(hBmpKern); + GDIOBJ_SetOwnership((HBITMAP)pLogBrush->lbHatch, NULL); + return GreCreatePatternBrush((HBITMAP)pLogBrush->lbHatch); case BS_DIBPATTERN: default: UNIMPLEMENTED; Modified: branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/gre/gdiobj.c [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -984,6 +984,8 @@ HandleType = GDI_HANDLE_GET_TYPE(hObj); HandleUpper = GDI_HANDLE_GET_UPPER(hObj); + //ASSERT(hObj); + /* Check that the handle index is valid. */ if (HandleIndex >= GDI_HANDLE_COUNT) return NULL; @@ -993,6 +995,7 @@ HandleType != ExpectedType) || HandleType == 0 ) { + //ASSERT(FALSE); DPRINT1("Attempted to lock object 0x%x of wrong type (Handle: 0x%x, requested: 0x%x)\n", hObj, HandleType, ExpectedType); return NULL; @@ -1520,147 +1523,4 @@ } -/* Usermode -> kernelmode handle mapping */ -LIST_ENTRY HandleMapping; -KSPIN_LOCK HandleMappingLock; - -typedef struct _HMAPPING -{ - HGDIOBJ hUser; - HGDIOBJ hKernel; - HANDLE hProcessId; - LIST_ENTRY Entry; -} HMAPPING, *PHMAPPING; - -VOID NTAPI -GDI_InitHandleMapping() -{ - /* Initialize handles list and a spinlock */ - InitializeListHead(&HandleMapping); - KeInitializeSpinLock(&HandleMappingLock); -} - -VOID NTAPI -GDI_AddHandleMapping(HGDIOBJ hKernel, HGDIOBJ hUser) -{ - HGDIOBJ hExisting; - PHMAPPING pMapping = ExAllocatePool(NonPagedPool, sizeof(HMAPPING)); - if (!pMapping) return; - - /* Set mapping */ - pMapping->hUser = hUser; - pMapping->hKernel = hKernel; - pMapping->hProcessId = PsGetCurrentProcessId(); - - /* Debug check: see if we already have this mapping */ - hExisting = GDI_MapUserHandle(hUser); - if (hExisting) - DPRINT1("Trying to map already existing mapping %x -> %x to %x!\n", hUser, hExisting, hKernel); - - /* Add it to the list */ - ExInterlockedInsertHeadList(&HandleMapping, &pMapping->Entry, &HandleMappingLock); -} - -HGDIOBJ NTAPI -GDI_MapUserHandle(HGDIOBJ hUser) -{ - KIRQL OldIrql; - PLIST_ENTRY Current; - PHMAPPING Mapping; - HGDIOBJ Found = 0; - HANDLE hProcessId = PsGetCurrentProcessId(); - - /* Acquire the lock and check if the list is empty */ - KeAcquireSpinLock(&HandleMappingLock, &OldIrql); - - /* Traverse the list to find our mapping */ - Current = HandleMapping.Flink; - while(Current != &HandleMapping) - { - Mapping = CONTAINING_RECORD(Current, HMAPPING, Entry); - - /* Check if it's our entry */ - if (Mapping->hUser == hUser && Mapping->hProcessId == hProcessId) - { - /* Found it, save it and break out of the loop */ - Found = Mapping->hKernel; - break; - } - - /* Advance to the next pair */ - Current = Current->Flink; - } - - /* Release the lock and return the entry */ - KeReleaseSpinLock(&HandleMappingLock, OldIrql); - return Found; -} - -VOID NTAPI -GDI_RemoveHandleMapping(HGDIOBJ hUser) -{ - KIRQL OldIrql; - PLIST_ENTRY Current; - PHMAPPING Mapping; - HANDLE hProcessId = PsGetCurrentProcessId(); - - /* Acquire the lock and check if the list is empty */ - KeAcquireSpinLock(&HandleMappingLock, &OldIrql); - - /* Traverse the list to find our mapping */ - Current = HandleMapping.Flink; - while(Current != &HandleMapping) - { - Mapping = CONTAINING_RECORD(Current, HMAPPING, Entry); - - /* Check if it's our entry */ - if (Mapping->hUser == hUser && Mapping->hProcessId == hProcessId) - { - /* Remove and free it */ - RemoveEntryList(Current); - ExFreePool(Mapping); - break; - } - - /* Advance to the next pair */ - Current = Current->Flink; - } - - /* Release the lock and return the entry */ - KeReleaseSpinLock(&HandleMappingLock, OldIrql); -} - -VOID NTAPI -GDI_CleanupHandleMapping() -{ - KIRQL OldIrql; - PLIST_ENTRY Current; - PHMAPPING Mapping; - HANDLE hProcessId = PsGetCurrentProcessId(); - - /* Acquire the lock and check if the list is empty */ - KeAcquireSpinLock(&HandleMappingLock, &OldIrql); - - /* Traverse the list to find all handles of a current process */ - Current = HandleMapping.Flink; - while(Current != &HandleMapping) - { - Mapping = CONTAINING_RECORD(Current, HMAPPING, Entry); - - /* Check if it's our entry */ - if (Mapping->hProcessId == hProcessId) - { - /* Remove and free it */ - RemoveEntryList(Current); - ExFreePool(Mapping); - } - - /* Advance to the next pair */ - Current = Current->Flink; - } - - /* Release the lock and return the entry */ - KeReleaseSpinLock(&HandleMappingLock, OldIrql); -} - /* EOF */ Modified: branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/main/cursor.c [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -123,11 +123,6 @@ return; } - IconInfo->hbmMask = GDI_MapUserHandle(IconInfo->hbmMask); - IconInfo->hbmColor = GDI_MapUserHandle(IconInfo->hbmColor); - - DPRINT("hbmMask = 0x%x, hbmColor = 0x%x\n", IconInfo->hbmMask, IconInfo->hbmColor); - GreSetPointerShape( hDCscreen, IconInfo->hbmMask, IconInfo->hbmColor, Modified: branches/arwinss/reactos/subsystems/win32/win32k/main/init.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/main/init.c [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/main/init.c [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -101,9 +101,6 @@ } UserLeave(); - - /* Destroy all user->kernel handle mapping */ - GDI_CleanupHandleMapping(); } DPRINT("Leave Win32kProcessCallback\n"); @@ -368,9 +365,6 @@ return STATUS_UNSUCCESSFUL; } - /* Initialize handle-mapping */ - GDI_InitHandleMapping(); - /* Create stock objects */ CreateStockObjects(); Modified: branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Sat Jan 8 08:57:15 2011 @@ -1,8 +1,8 @@ wine_server_call 1 RosGdiAlphaBlend 11 RosGdiBitBlt 9 -RosGdiCreateBitmap 4 -RosGdiCreateDIBSection 5 +RosGdiCreateBitmap 3 +RosGdiCreateDIBSection 4 RosGdiDeleteBitmap 1 RosGdiGetBitmapBits 3 RosGdiGetDIBits 8
13 years, 10 months
1
0
0
0
[fireball] 50316: - Use updated SWM interface in winent.drv, and cleanup code.
by fireball@svn.reactos.org
Author: fireball Date: Fri Jan 7 21:53:30 2011 New Revision: 50316 URL:
http://svn.reactos.org/svn/reactos?rev=50316&view=rev
Log: - Use updated SWM interface in winent.drv, and cleanup code. Modified: branches/arwinss/reactos/dll/win32/winent.drv/window.c Modified: branches/arwinss/reactos/dll/win32/winent.drv/window.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/window.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/window.c [iso-8859-1] Fri Jan 7 21:53:30 2011 @@ -27,7 +27,7 @@ static const char whole_window_prop[] = "__arwin_nt_whole_window"; static const char client_window_prop[]= "__arwin_nt_client_window"; -GR_WINDOW_ID root_window = 2; +GR_WINDOW_ID root_window = SWM_ROOT_WINDOW_ID; /* FUNCTIONS **************************************************************/ @@ -153,7 +153,7 @@ { WARN("RosDrv_CreateWindow(%x)\n", hwnd); - if (hwnd == GetDesktopWindow() /*&& root_window != GR_ROOT_WINDOW_ID*/) + if (hwnd == GetDesktopWindow() /*&& root_window != SWM_ROOT_WINDOW_ID*/) { /* create desktop win data */ if (!NTDRV_create_desktop_win_data( hwnd )) return FALSE; @@ -244,8 +244,7 @@ if (!data->whole_window) return; TRACE( "win %p xwin %lx/%lx\n", data->hwnd, data->whole_window, data->client_window ); - //if (!already_destroyed) GrDestroyWindow( data->whole_window ); - if (!already_destroyed) SwmRemoveWindow( data->hwnd ); + if (!already_destroyed) SwmDestroyWindow( data->whole_window ); data->whole_window = data->client_window = 0; //data->wm_state = WithdrawnState; //data->net_wm_state = 0; @@ -288,8 +287,7 @@ TRACE( "win %p/%lx\n", data->hwnd, data->whole_window ); //sync_window_style( display, data ); - //GrMapWindow( data->whole_window ); - SwmShowWindow( data->hwnd, TRUE, 0 ); + SwmShowWindow( data->whole_window, TRUE, 0 ); data->mapped = TRUE; data->iconic = (new_style & WS_MINIMIZE) != 0; @@ -303,8 +301,7 @@ { TRACE( "win %p/%lx\n", data->hwnd, data->whole_window ); - //GrUnmapWindow( data->whole_window ); - SwmShowWindow( data->hwnd, FALSE, 0 ); + SwmShowWindow( data->whole_window, FALSE, 0 ); data->mapped = FALSE; //data->net_wm_state = 0; @@ -325,7 +322,7 @@ if (data->iconic) return; - SwmPosChanged(data->hwnd, &data->whole_rect, old_whole_rect, NULL, swp_flags); + SwmPosChanged(data->whole_window, &data->whole_rect, old_whole_rect, NULL, swp_flags); width = data->whole_rect.right - data->whole_rect.left; height = data->whole_rect.bottom - data->whole_rect.top; @@ -546,7 +543,7 @@ //DWORD layered_flags; HRGN win_rgn; //GR_WM_PROPERTIES props; - DWORD style, ex_style; + DWORD ex_style; if ((win_rgn = CreateRectRgn( 0, 0, 0, 0 )) && GetWindowRgn( data->hwnd, win_rgn ) == ERROR) @@ -565,20 +562,12 @@ if (!(cy = data->whole_rect.bottom - data->whole_rect.top)) cy = 1; else if (cy > 65535) cy = 65535; - //data->whole_window = GrNewWindow( root_window, - // data->whole_rect.left, - // data->whole_rect.top, - // cx, cy, 0, RGB(255,255,255), 0 ); - data->whole_window = (GR_WINDOW_ID)1; - - /* Inform window manager about window rect in screen coords */ - style = GetWindowLongW( data->hwnd, GWL_STYLE ); ex_style = GetWindowLongW( data->hwnd, GWL_EXSTYLE ); - SwmAddWindow(data->hwnd, &data->window_rect, style, ex_style); + + data->whole_window = SwmNewWindow( root_window, + &data->whole_rect, data->hwnd, ex_style ); //GrSelectEvents(data->whole_window, GR_EVENT_MASK_EXPOSURE); - - //if (data->whole_window) GrSetHwnd( data->whole_window, data->hwnd ); if (!data->whole_window) goto done; @@ -589,7 +578,7 @@ if (!create_client_window( data )) { - //GrDestroyWindow( data->whole_window ); + SwmDestroyWindow( data->whole_window ); data->whole_window = 0; goto done; } @@ -820,8 +809,6 @@ if (!(data = NTDRV_create_win_data( hwnd ))) return; } - //SwmPosChanging(hwnd, window_rect); - //TRACE( "win %x pos is changing. vis rect %s, win rect %s\n", // hwnd, wine_dbgstr_rect(visible_rect), wine_dbgstr_rect(window_rect) );
13 years, 10 months
1
0
0
0
[fireball] 50315: - Change SWM interface to better suit new requirements. Move to window ids instead of always referencing by hwnd (will be needed to distinct between whole and client windows).
by fireball@svn.reactos.org
Author: fireball Date: Fri Jan 7 21:51:51 2011 New Revision: 50315 URL:
http://svn.reactos.org/svn/reactos?rev=50315&view=rev
Log: - Change SWM interface to better suit new requirements. Move to window ids instead of always referencing by hwnd (will be needed to distinct between whole and client windows). Modified: branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db Modified: branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- 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] Fri Jan 7 21:51:51 2011 @@ -329,16 +329,16 @@ } -VOID -NTAPI -SwmAddWindow(HWND hWnd, RECT *WindowRect, DWORD style, DWORD ex_style) +GR_WINDOW_ID +NTAPI +SwmNewWindow(GR_WINDOW_ID parent, RECT *WindowRect, HWND hWnd, DWORD ex_style) { PSWM_WINDOW Win, FirstNonTop; DPRINT("SwmAddWindow %x\n", hWnd); - DPRINT("rect (%d,%d)-(%d,%d), style %x, ex_style %x\n", + DPRINT("rect (%d,%d)-(%d,%d), ex_style %x\n", WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom, - style, ex_style); + ex_style); /* Acquire the lock */ SwmAcquire(); @@ -381,6 +381,8 @@ /* Release the lock */ SwmRelease(); + + return (GR_WINDOW_ID)Win; } VOID @@ -458,25 +460,20 @@ VOID NTAPI -SwmRemoveWindow(HWND hWnd) +SwmDestroyWindow(GR_WINDOW_ID Wid) { PSWM_WINDOW Win; + + /* Check for root window */ + if (Wid == SWM_ROOT_WINDOW_ID) return; /* Acquire the lock */ SwmAcquire(); - DPRINT("SwmRemoveWindow %x\n", hWnd); - /* Allocate entry */ - Win = SwmFindByHwnd(hWnd); - //ASSERT(Win != NULL); - if (!Win) - { - /* Release the lock */ - SwmRelease(); - - return; - } + Win = (PSWM_WINDOW)Wid; + + DPRINT("SwmRemoveWindow %x\n", Win->hwnd); /* Remove it from the zorder list */ RemoveEntryList(&Win->Entry); @@ -713,13 +710,7 @@ VOID NTAPI -SwmPosChanging(HWND hWnd, const RECT *WindowRect) -{ -} - -VOID -NTAPI -SwmPosChanged(HWND hWnd, const RECT *WindowRect, const RECT *OldRect, HWND hWndAfter, UINT SwpFlags) +SwmPosChanged(GR_WINDOW_ID Wid, const RECT *WindowRect, const RECT *OldRect, HWND hWndAfter, UINT SwpFlags) { PSWM_WINDOW SwmWin, SwmPrev; LONG Width, Height, OldWidth, OldHeight; @@ -727,17 +718,13 @@ struct region *OldRegion, *DiffRegion; rectangle_t OldRectSafe; + /* Check for root window */ + if (Wid == SWM_ROOT_WINDOW_ID) return; + /* Acquire the lock */ SwmAcquire(); - /* Allocate entry */ - SwmWin = SwmFindByHwnd(hWnd); - if (!SwmWin) - { - /* Release the lock */ - SwmRelease(); - return; - } + SwmWin = (PSWM_WINDOW)Wid; /* Save parameters */ OldRectSafe.left = OldRect->left; OldRectSafe.top = OldRect->top; @@ -770,7 +757,7 @@ return; } - DPRINT("SwmPosChanged hwnd %x, new rect (%d,%d)-(%d,%d)\n", hWnd, + DPRINT("SwmPosChanged hwnd %x, new rect (%d,%d)-(%d,%d)\n", SwmWin->hwnd, WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom); SwmWin->Window.left = WindowRect->left; @@ -828,24 +815,20 @@ VOID NTAPI -SwmShowWindow(HWND hWnd, BOOLEAN Show, UINT SwpFlags) +SwmShowWindow(GR_WINDOW_ID Wid, BOOLEAN Show, UINT SwpFlags) { PSWM_WINDOW Win; struct region *OldRegion; + /* Check for root window */ + if (Wid == SWM_ROOT_WINDOW_ID) return; + /* Acquire the lock */ SwmAcquire(); - DPRINT("SwmShowWindow %x, Show %d\n", hWnd, Show); - - /* Allocate entry */ - Win = SwmFindByHwnd(hWnd); - if (!Win) - { - /* Release the lock */ - SwmRelease(); - return; - } + Win = (PSWM_WINDOW)Wid; + + DPRINT("SwmShowWindow %x, Show %d\n", Win->hwnd, Show); if (Show && Win->Hidden) { Modified: branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/subsystems/win3…
============================================================================== --- branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] (original) +++ branches/arwinss/reactos/subsystems/win32/win32k/w32ksvc.db [iso-8859-1] Fri Jan 7 21:51:51 2011 @@ -85,11 +85,10 @@ RosUserRegisterShellHookWindow 1 RosUserDeRegisterShellHookWindow 1 RosUserBuildShellHookHwndList 2 -SwmAddWindow 4 +SwmNewWindow 4 SwmAddDesktopWindow 3 -SwmRemoveWindow 1 +SwmDestroyWindow 1 SwmSetForeground 1 -SwmPosChanging 2 SwmPosChanged 5 SwmGetWindowFromPoint 2 SwmShowWindow 3
13 years, 10 months
1
0
0
0
← Newer
1
...
24
25
26
27
28
29
30
...
34
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Results per page:
10
25
50
100
200