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
December
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
December 2009
----- 2024 -----
December 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
22 participants
501 discussions
Start a n
N
ew thread
[fireball] 44812: - Pass swp flags to SWM and cleanup usermode part of WindowPosChanged. - SWM: Silence debug prints. - SWM: Warn when the zorder change is requested but not performed (and window's zorder doesn't match the requested one). - SWM: Don't use SwmBringToFront in SwmShowWindow and make it respect the SWP_NOZORDER flag.
by fireball@svn.reactos.org
Author: fireball Date: Wed Dec 30 14:26:24 2009 New Revision: 44812 URL:
http://svn.reactos.org/svn/reactos?rev=44812&view=rev
Log: - Pass swp flags to SWM and cleanup usermode part of WindowPosChanged. - SWM: Silence debug prints. - SWM: Warn when the zorder change is requested but not performed (and window's zorder doesn't match the requested one). - SWM: Don't use SwmBringToFront in SwmShowWindow and make it respect the SWP_NOZORDER flag. Modified: branches/arwinss/reactos/dll/win32/winent.drv/userdrv.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/userdrv.c URL:
http://svn.reactos.org/svn/reactos/branches/arwinss/reactos/dll/win32/winen…
============================================================================== --- branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] (original) +++ branches/arwinss/reactos/dll/win32/winent.drv/userdrv.c [iso-8859-1] Wed Dec 30 14:26:24 2009 @@ -892,9 +892,6 @@ const RECT *visible_rect, const RECT *valid_rects ) { RECT old_whole_rect, old_client_rect; - //RECT whole_rect = *visible_rect; - //RECT client_rect = *rectClient; - struct ntdrv_win_data *data = NTDRV_get_win_data(hwnd); if (!data) return; @@ -939,22 +936,13 @@ /* Sync position change */ if (!(swp_flags & SWP_NOREDRAW)) // HACK: When removing this explorer's start menu start to appear partially. Investigate! - SwmPosChanged(hwnd, &data->whole_rect, &old_whole_rect); + SwmPosChanged(hwnd, &data->whole_rect, &old_whole_rect, insert_after, swp_flags); /* Pass show/hide information to the window manager */ if (swp_flags & SWP_SHOWWINDOW) - { - if (swp_flags & SWP_NOZORDER) FIXME("no zorder change for hwnd %x, ignoring!\n", hwnd); - //if (swp_flags & SWP_NOACTIVATE) FIXME("no activate change, ignoring!\n"); - - //SwmSetForeground(hwnd); - SwmShowWindow(hwnd, TRUE); - } + SwmShowWindow(hwnd, TRUE, swp_flags); else if (swp_flags & SWP_HIDEWINDOW) - SwmShowWindow(hwnd, FALSE); - -// visible: 0x1843, hide: 0x1883. 1843 = 1 + 2 + 64 + 2048 + 4096 - //RosDrv_UpdateZOrder(hwnd, (RECT*)visible_rect); + SwmShowWindow(hwnd, FALSE, swp_flags); } /* EOF */ 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] Wed Dec 30 14:26:24 2009 @@ -169,12 +169,12 @@ SwmPosChanging(HWND hWnd, const RECT *WindowRect); VOID NTAPI -SwmPosChanged(HWND hWnd, const RECT *WindowRect, const RECT *OldRect); +SwmPosChanged(HWND hWnd, const RECT *WindowRect, const RECT *OldRect, HWND hWndAfter, UINT SwpFlags); HWND NTAPI SwmGetWindowFromPoint(LONG x, LONG y); VOID NTAPI -SwmShowWindow(HWND hWnd, BOOLEAN Show); +SwmShowWindow(HWND hWnd, BOOLEAN Show, UINT SwpFlags); #endif /* __WIN32K_NTUSER_H */ 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] Wed Dec 30 14:26:24 2009 @@ -95,7 +95,7 @@ req.window = (UINT_PTR)Window->hwnd; req_update_window_zorder(&req, &reply); } - DbgPrint("\n"); + //DbgPrint("\n"); /* Convert region to client coordinates */ offset_region(ClientRegion, -Window->Window.left, -Window->Window.top); @@ -300,8 +300,8 @@ { PSWM_WINDOW Win; - DPRINT1("SwmAddWindow %x\n", hWnd); - DPRINT1("rect (%d,%d)-(%d,%d)\n", WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom); + DPRINT("SwmAddWindow %x\n", hWnd); + DPRINT("rect (%d,%d)-(%d,%d)\n", WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom); /* Acquire the lock */ SwmAcquire(); @@ -416,7 +416,7 @@ /* Acquire the lock */ SwmAcquire(); - DPRINT1("SwmRemoveWindow %x\n", hWnd); + DPRINT("SwmRemoveWindow %x\n", hWnd); /* Allocate entry */ Win = SwmFindByHwnd(hWnd); @@ -536,9 +536,9 @@ VOID NTAPI -SwmPosChanged(HWND hWnd, const RECT *WindowRect, const RECT *OldRect) -{ - PSWM_WINDOW SwmWin; +SwmPosChanged(HWND hWnd, const RECT *WindowRect, const RECT *OldRect, HWND hWndAfter, UINT SwpFlags) +{ + PSWM_WINDOW SwmWin, SwmPrev; /* Acquire the lock */ SwmAcquire(); @@ -552,8 +552,9 @@ return; } - /* Check if window really moved anywhere */ - if (WindowRect->left - OldRect->left == 0 && + /* Check if window really moved anywhere (origin, size or z order) */ + if (hWndAfter == 0 && + WindowRect->left - OldRect->left == 0 && WindowRect->top - OldRect->top == 0 && WindowRect->right - OldRect->right == 0 && WindowRect->bottom - OldRect->bottom == 0) @@ -562,14 +563,28 @@ SwmRelease(); return; } -//DPRINT1("rect (%d,%d)-(%d,%d)\n", TmpRect.left, TmpRect.top, TmpRect.right, TmpRect.bottom); - DPRINT1("SwmPosChanged hwnd %x, new rect (%d,%d)-(%d,%d)\n", hWnd, WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom); + + DPRINT("SwmPosChanged hwnd %x, new rect (%d,%d)-(%d,%d)\n", hWnd, + WindowRect->left, WindowRect->top, WindowRect->right, WindowRect->bottom); SwmWin->Window.left = WindowRect->left; SwmWin->Window.top = WindowRect->top; SwmWin->Window.right = WindowRect->right; SwmWin->Window.bottom = WindowRect->bottom; + /* Check if we need to change zorder */ + if (hWndAfter && !(SwpFlags & SWP_NOZORDER)) + { + /* Get the previous window */ + SwmPrev = CONTAINING_RECORD(SwmWin->Entry.Blink, SWM_WINDOW, Entry); + + /* Check if they are different */ + if (SwmPrev->hwnd != hWndAfter) + { + DPRINT1("WARNING: Change in zorder is requested but ignored! Previous hwnd %x, but should be %x\n", SwmPrev->hwnd, hWndAfter); + } + } + /* Recalculate all clipping */ SwmClipAllWindows(); @@ -579,7 +594,7 @@ VOID NTAPI -SwmShowWindow(HWND hWnd, BOOLEAN Show) +SwmShowWindow(HWND hWnd, BOOLEAN Show, UINT SwpFlags) { PSWM_WINDOW Win; struct region *OldRegion; @@ -601,13 +616,28 @@ if (Show && Win->Hidden) { /* Change state from hidden to visible */ - DPRINT1("Unhiding %x, rect (%d,%d)-(%d,%d)\n", Win->hwnd, Win->Window.left, Win->Window.top, Win->Window.right, Win->Window.bottom); + DPRINT("Unhiding %x, rect (%d,%d)-(%d,%d)\n", Win->hwnd, Win->Window.left, Win->Window.top, Win->Window.right, Win->Window.bottom); Win->Hidden = FALSE; - SwmBringToFront(Win); + + /* Make it topmost window if needed */ + if (!(SwpFlags & SWP_NOZORDER)) + { + /* Remove it from the list */ + RemoveEntryList(&Win->Entry); + + /* Add it to the head of the list */ + InsertHeadList(&SwmWindows, &Win->Entry); + } + + /* Calculate visible regions for all windows */ + SwmClipAllWindows(); + + /* Draw the newly appeared window */ + SwmInvalidateRegion(Win, Win->Visible, NULL); } else if (!Show && !Win->Hidden) { - DPRINT1("Hiding %x\n", Win->hwnd); + DPRINT("Hiding %x\n", Win->hwnd); /* Change state from visible to hidden */ Win->Hidden = TRUE; 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] Wed Dec 30 14:26:24 2009 @@ -91,6 +91,6 @@ SwmRemoveWindow 1 SwmSetForeground 1 SwmPosChanging 2 -SwmPosChanged 3 +SwmPosChanged 5 SwmGetWindowFromPoint 2 -SwmShowWindow 2 +SwmShowWindow 3
14 years, 11 months
1
0
0
0
[cgutman] 44811: - Forgot this file
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Dec 30 13:53:47 2009 New Revision: 44811 URL:
http://svn.reactos.org/svn/reactos?rev=44811&view=rev
Log: - Forgot this file Modified: branches/aicom-network-branch/lib/drivers/ip/transport/tcp/event.c Modified: branches/aicom-network-branch/lib/drivers/ip/transport/tcp/event.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/lib/driver…
============================================================================== --- branches/aicom-network-branch/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] (original) +++ branches/aicom-network-branch/lib/drivers/ip/transport/tcp/event.c [iso-8859-1] Wed Dec 30 13:53:47 2009 @@ -76,8 +76,8 @@ return OSK_EINVAL; } - if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) { - TI_DbgPrint(MIN_TRACE,("No route to %s\n", A2S(&RemoteAddress))); + if(!(NCE = NBLocateNeighbor( &LocalAddress ))) { + TI_DbgPrint(MIN_TRACE,("Interface doesn't exist! %s\n", A2S(&LocalAddress))); return OSK_EADDRNOTAVAIL; }
14 years, 11 months
1
0
0
0
[cgutman] 44810: [IP] - Bind to the address specified in AddressFile instead of always binding to the outgoing interface's unicast address - Get the NCE using the local address (if specified) so we don't end up sending from one interface using another interface's address as the source
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Dec 30 13:46:14 2009 New Revision: 44810 URL:
http://svn.reactos.org/svn/reactos?rev=44810&view=rev
Log: [IP] - Bind to the address specified in AddressFile instead of always binding to the outgoing interface's unicast address - Get the NCE using the local address (if specified) so we don't end up sending from one interface using another interface's address as the source Modified: branches/aicom-network-branch/lib/drivers/ip/network/icmp.c branches/aicom-network-branch/lib/drivers/ip/transport/rawip/rawip.c branches/aicom-network-branch/lib/drivers/ip/transport/tcp/tcp.c branches/aicom-network-branch/lib/drivers/ip/transport/udp/udp.c Modified: branches/aicom-network-branch/lib/drivers/ip/network/icmp.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/lib/driver…
============================================================================== --- branches/aicom-network-branch/lib/drivers/ip/network/icmp.c [iso-8859-1] (original) +++ branches/aicom-network-branch/lib/drivers/ip/network/icmp.c [iso-8859-1] Wed Dec 30 13:46:14 2009 @@ -178,9 +178,6 @@ TI_DbgPrint(MID_TRACE,("About to get route to destination\n")); - if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) - return STATUS_NETWORK_UNREACHABLE; - LocalAddress = AddrFile->Address; if (AddrIsUnspecified(&LocalAddress)) { @@ -188,7 +185,15 @@ * then use the unicast address of the * interface we're sending over */ + if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) + return STATUS_NETWORK_UNREACHABLE; + LocalAddress = NCE->Interface->Unicast; + } + else + { + if(!(NCE = NBLocateNeighbor( &LocalAddress ))) + return STATUS_INVALID_PARAMETER; } Status = PrepareICMPPacket( NCE->Interface, Modified: branches/aicom-network-branch/lib/drivers/ip/transport/rawip/rawip.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/lib/driver…
============================================================================== --- branches/aicom-network-branch/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1] (original) +++ branches/aicom-network-branch/lib/drivers/ip/transport/rawip/rawip.c [iso-8859-1] Wed Dec 30 13:46:14 2009 @@ -218,12 +218,6 @@ TI_DbgPrint(MID_TRACE,("About to get route to destination\n")); - if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) - { - KeReleaseSpinLock(&AddrFile->Lock, OldIrql); - return STATUS_NETWORK_UNREACHABLE; - } - LocalAddress = AddrFile->Address; if (AddrIsUnspecified(&LocalAddress)) { @@ -231,7 +225,19 @@ * then use the unicast address of the * interface we're sending over */ + if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) { + KeReleaseSpinLock(&AddrFile->Lock, OldIrql); + return STATUS_NETWORK_UNREACHABLE; + } + LocalAddress = NCE->Interface->Unicast; + } + else + { + if(!(NCE = NBLocateNeighbor( &LocalAddress ))) { + KeReleaseSpinLock(&AddrFile->Lock, OldIrql); + return STATUS_INVALID_PARAMETER; + } } Status = BuildRawIpPacket( AddrFile, Modified: branches/aicom-network-branch/lib/drivers/ip/transport/tcp/tcp.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/lib/driver…
============================================================================== --- branches/aicom-network-branch/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] (original) +++ branches/aicom-network-branch/lib/drivers/ip/transport/tcp/tcp.c [iso-8859-1] Wed Dec 30 13:46:14 2009 @@ -631,11 +631,6 @@ return Status; } - if (!(NCE = RouteGetRouteToDestination(&RemoteAddress))) - { - return STATUS_NETWORK_UNREACHABLE; - } - /* Freed in TCPSocketState */ TI_DbgPrint(DEBUG_TCP, ("Connecting to address %x:%x\n", @@ -644,9 +639,29 @@ AddressToConnect.sin_family = AF_INET; AddressToBind = AddressToConnect; - AddressToBind.sin_addr.s_addr = NCE->Interface->Unicast.Address.IPv4Address; KeAcquireSpinLock(&Connection->Lock, &OldIrql); + + if (!Connection->AddressFile) + { + KeReleaseSpinLock(&Connection->Lock, OldIrql); + return STATUS_INVALID_PARAMETER; + } + + if (AddrIsUnspecified(&Connection->AddressFile->Address)) + { + if (!(NCE = RouteGetRouteToDestination(&RemoteAddress))) + { + KeReleaseSpinLock(&Connection->Lock, OldIrql); + return STATUS_NETWORK_UNREACHABLE; + } + + AddressToBind.sin_addr.s_addr = NCE->Interface->Unicast.Address.IPv4Address; + } + else + { + AddressToBind.sin_addr.s_addr = Connection->AddressFile->Address.Address.IPv4Address; + } Status = TCPTranslateError ( OskitTCPBind( Connection->SocketContext, Modified: branches/aicom-network-branch/lib/drivers/ip/transport/udp/udp.c URL:
http://svn.reactos.org/svn/reactos/branches/aicom-network-branch/lib/driver…
============================================================================== --- branches/aicom-network-branch/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] (original) +++ branches/aicom-network-branch/lib/drivers/ip/transport/udp/udp.c [iso-8859-1] Wed Dec 30 13:46:14 2009 @@ -193,11 +193,6 @@ return STATUS_UNSUCCESSFUL; } - if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) { - KeReleaseSpinLock(&AddrFile->Lock, OldIrql); - return STATUS_NETWORK_UNREACHABLE; - } - LocalAddress = AddrFile->Address; if (AddrIsUnspecified(&LocalAddress)) { @@ -205,7 +200,19 @@ * then use the unicast address of the * interface we're sending over */ + if(!(NCE = RouteGetRouteToDestination( &RemoteAddress ))) { + KeReleaseSpinLock(&AddrFile->Lock, OldIrql); + return STATUS_NETWORK_UNREACHABLE; + } + LocalAddress = NCE->Interface->Unicast; + } + else + { + if(!(NCE = NBLocateNeighbor( &LocalAddress ))) { + KeReleaseSpinLock(&AddrFile->Lock, OldIrql); + return STATUS_INVALID_PARAMETER; + } } Status = BuildUDPPacket( AddrFile,
14 years, 11 months
1
0
0
0
[gschneider] 44809: [win32k] Add support for mask offsets in IntEngStretchBlt
by gschneider@svn.reactos.org
Author: gschneider Date: Wed Dec 30 13:42:48 2009 New Revision: 44809 URL:
http://svn.reactos.org/svn/reactos?rev=44809&view=rev
Log: [win32k] Add support for mask offsets in IntEngStretchBlt Modified: trunk/reactos/subsystems/win32/win32k/eng/stretchblt.c Modified: trunk/reactos/subsystems/win32/win32k/eng/stretchblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/stretchblt.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/stretchblt.c [iso-8859-1] Wed Dec 30 13:42:48 2009 @@ -389,7 +389,7 @@ { BOOLEAN ret; COLORADJUSTMENT ca; - POINT MaskOrigin; + POINTL MaskOrigin = {0, 0}; SURFACE *psurfDest; SURFACE *psurfSource = NULL; RECTL InputClippedRect; @@ -456,7 +456,8 @@ if (pMaskOrigin != NULL) { - MaskOrigin.x = pMaskOrigin->x; MaskOrigin.y = pMaskOrigin->y; + MaskOrigin.x = pMaskOrigin->x; + MaskOrigin.y = pMaskOrigin->y; } /* No success yet */ @@ -482,16 +483,35 @@ if (psurfDest->flHooks & HOOK_STRETCHBLTROP) { /* Drv->StretchBltROP (look at
http://www.osronline.com/ddkx/graphics/ddifncs_0z3b.htm
) */ - // FIXME: MaskOrigin is always NULL ! - ret = GDIDEVFUNCS(psoDest).StretchBltROP(psoDest, (UsesSource) ? psoSource : NULL, MaskSurf, ClipRegion, ColorTranslation, - &ca, BrushOrigin, &OutputRect, &InputRect, NULL, COLORONCOLOR, pbo, ROP); + ret = GDIDEVFUNCS(psoDest).StretchBltROP(psoDest, + (UsesSource) ? psoSource : NULL, + MaskSurf, + ClipRegion, + ColorTranslation, + &ca, BrushOrigin, + &OutputRect, + &InputRect, + &MaskOrigin, + COLORONCOLOR, + pbo, + ROP); } if (! ret) { - // FIXME: see previous fixme - ret = EngStretchBltROP(psoDest, (UsesSource) ? psoSource : NULL, MaskSurf, ClipRegion, ColorTranslation, - &ca, BrushOrigin, &OutputRect, &InputRect, NULL, COLORONCOLOR, pbo, ROP); + ret = EngStretchBltROP(psoDest, + (UsesSource) ? psoSource : NULL, + MaskSurf, + ClipRegion, + ColorTranslation, + &ca, + BrushOrigin, + &OutputRect, + &InputRect, + &MaskOrigin, + COLORONCOLOR, + pbo, + ROP); } if (UsesSource)
14 years, 11 months
1
0
0
0
[gschneider] 44808: [user32] Set the number of colors correctly when creating a monochrome bitmap
by gschneider@svn.reactos.org
Author: gschneider Date: Wed Dec 30 13:39:19 2009 New Revision: 44808 URL:
http://svn.reactos.org/svn/reactos?rev=44808&view=rev
Log: [user32] Set the number of colors correctly when creating a monochrome bitmap Modified: trunk/reactos/dll/win32/user32/windows/icon.c Modified: trunk/reactos/dll/win32/user32/windows/icon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/i…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/icon.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/icon.c [iso-8859-1] Wed Dec 30 13:39:19 2009 @@ -75,8 +75,8 @@ bwBIH->bmiHeader.biPlanes = 1; bwBIH->bmiHeader.biSizeImage = 0; bwBIH->bmiHeader.biCompression = BI_RGB; - bwBIH->bmiHeader.biClrImportant = 0; - bwBIH->bmiHeader.biClrUsed = 0; + bwBIH->bmiHeader.biClrImportant = 2; + bwBIH->bmiHeader.biClrUsed = 2; bwBIH->bmiHeader.biXPelsPerMeter = 0; bwBIH->bmiHeader.biYPelsPerMeter = 0;
14 years, 11 months
1
0
0
0
[sserapion] 44807: Add definitions for the x86bios emulator. http://www.geoffchappell.com/viewer.htm?doc=studies/windows/km/hal/api/x86bios/index.htm
by sserapion@svn.reactos.org
Author: sserapion Date: Wed Dec 30 08:53:02 2009 New Revision: 44807 URL:
http://svn.reactos.org/svn/reactos?rev=44807&view=rev
Log: Add definitions for the x86bios emulator.
http://www.geoffchappell.com/viewer.htm?doc=studies/windows/km/hal/api/x86b…
Added: branches/ros-amd64-bringup/reactos/hal/halamd64/generic/x86bios.c (with props) Modified: branches/ros-amd64-bringup/reactos/hal/hal/hal.c branches/ros-amd64-bringup/reactos/hal/hal/hal.rbuild branches/ros-amd64-bringup/reactos/hal/hal/hal_amd64.def branches/ros-amd64-bringup/reactos/hal/halamd64/generic/generic.rbuild branches/ros-amd64-bringup/reactos/hal/halamd64/generic/misc.c branches/ros-amd64-bringup/reactos/include/ndk/halfuncs.h branches/ros-amd64-bringup/reactos/include/ndk/haltypes.h Modified: branches/ros-amd64-bringup/reactos/hal/hal/hal.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/hal/hal.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/hal/hal.c [iso-8859-1] Wed Dec 30 08:53:02 2009 @@ -172,6 +172,13 @@ return NULL; } +VOID +NTAPI +HalBugCheckSystem (PVOID ErrorRecord) +{ + UNIMPLEMENTED; +} + NTSTATUS NTAPI @@ -248,7 +255,7 @@ NTAPI HalEndSystemInterrupt( KIRQL Irql, - ULONG Unknown2) + ULONG Vector) { UNIMPLEMENTED; } @@ -1106,4 +1113,61 @@ return 0; } +#ifdef _X86BIOS_ +NTSTATUS +NTAPI +x86BiosAllocateBuffer ( + ULONG *Size, + USHORT *Segment, + USHORT *Offset) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL;; + +} + +BOOLEAN +NTAPI +x86BiosCall ( + ULONG InterruptNumber, + X86_BIOS_REGISTERS *Registers) +{ + UNIMPLEMENTED; + return FALSE; +} + +NTSTATUS +NTAPI +x86BiosFreeBuffer ( + USHORT Segment, + USHORT Offset) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL;; +} + +NTSTATUS +x86BiosReadMemory ( + USHORT Segment, + USHORT Offset, + PVOID Buffer, + ULONG Size) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL;; +} + +NTSTATUS +NTAPI +x86BiosWriteMemory ( + USHORT Segment, + USHORT Offset, + PVOID Buffer, + ULONG Size) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL;; +} +#endif + /* EOF */ Modified: branches/ros-amd64-bringup/reactos/hal/hal/hal.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/hal/hal.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/hal/hal.rbuild [iso-8859-1] Wed Dec 30 08:53:02 2009 @@ -36,6 +36,7 @@ <include base="ntoskrnl">include</include> <library>ntoskrnl</library> <define name="_NTHAL_" /> + <define name="_X86BIOS_" /> <file>hal.c</file> <file>hal.rc</file> </module> Modified: branches/ros-amd64-bringup/reactos/hal/hal/hal_amd64.def URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/hal/hal_amd64.def [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/hal/hal_amd64.def [iso-8859-1] Wed Dec 30 08:53:02 2009 @@ -9,8 +9,9 @@ HalAllocateAdapterChannel HalAllocateCommonBuffer HalAllocateCrashDumpRegisters +;HalAllocateHardwareCounters HalAssignSlotResources -;HalBugCheckSystem +HalBugCheckSystem HalCalibratePerformanceCounter HalClearSoftwareInterrupt ;HalConvertDeviceIdtToIrql @@ -21,6 +22,7 @@ ;HalEnumerateProcessors HalFlushCommonBuffer HalFreeCommonBuffer +;HalFreeHardwareCounters HalGetAdapter HalGetBusData HalGetBusDataByOffset @@ -28,6 +30,7 @@ ;HalGetEnvironmentVariableEx ;HalGetInterruptTargetInformation HalGetInterruptVector +;HalGetMemoryCachingRequirements ;HalGetMessageRoutingInfo ;HalGetProcessorIdByNtNumber ;HalGetVectorInput @@ -39,6 +42,8 @@ HalInitializeProcessor ;HalIsHyperThreadingEnabled HalMakeBeep +;HalMcUpdateReadPCIConfig +;HalPerformEndOfInterrupt HalProcessorIdle HalQueryDisplayParameters ;HalQueryEnvironmentVariableInfoEx @@ -48,6 +53,8 @@ ;HalRegisterDynamicProcessor ;HalRegisterErrataCallbacks HalReportResourceUsage +;HalRequestClockInterrupt +;HalRequestDeferredRecoveryServiceInterrupt HalRequestIpi HalRequestSoftwareInterrupt HalReturnToFirmware @@ -67,7 +74,7 @@ HalStopProfileInterrupt HalSystemVectorDispatchEntry HalTranslateBusAddress -IoAssignDriveLetters +IoAssignDriveLetters ;not present in win7 IoFlushAdapterBuffers IoFreeAdapterChannel IoFreeMapRegisters @@ -79,8 +86,8 @@ KeFlushWriteBuffer KeQueryPerformanceCounter KeStallExecutionProcessor -;x86BiosAllocateBuffer -;x86BiosCall -;x86BiosFreeBuffer -;x86BiosReadMemory -;x86BiosWriteMemory +x86BiosAllocateBuffer +x86BiosCall +x86BiosFreeBuffer +x86BiosReadMemory +x86BiosWriteMemory Modified: branches/ros-amd64-bringup/reactos/hal/halamd64/generic/generic.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halamd64/generic/generic.rbuild [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halamd64/generic/generic.rbuild [iso-8859-1] Wed Dec 30 08:53:02 2009 @@ -6,6 +6,7 @@ <include base="ntoskrnl">include</include> <define name="_DISABLE_TIDENTS" /> <define name="_NTHAL_" /> + <define name="_X86BIOS_" /> <file>halinit.c</file> <file>irq.S</file> <file>misc.c</file> @@ -13,6 +14,7 @@ <file>systimer.S</file> <file>usage.c</file> <file>pic.c</file> + <file>x86bios.c</file> <pch>../include/hal.h</pch> </module> </group> Modified: branches/ros-amd64-bringup/reactos/hal/halamd64/generic/misc.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halamd64/generic/misc.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/hal/halamd64/generic/misc.c [iso-8859-1] Wed Dec 30 08:53:02 2009 @@ -96,6 +96,14 @@ return FALSE; } +VOID +NTAPI +HalBugCheckSystem (PVOID ErrorRecord) +{ + UNIMPLEMENTED; +} + + /* * @implemented */ @@ -126,3 +134,4 @@ Result.QuadPart = __rdtsc(); return Result; } + Added: branches/ros-amd64-bringup/reactos/hal/halamd64/generic/x86bios.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/hal/h…
============================================================================== --- branches/ros-amd64-bringup/reactos/hal/halamd64/generic/x86bios.c (added) +++ branches/ros-amd64-bringup/reactos/hal/halamd64/generic/x86bios.c [iso-8859-1] Wed Dec 30 08:53:02 2009 @@ -1,0 +1,69 @@ +/* + * PROJECT: ReactOS HAL + * LICENSE: See COPYING in the top level directory + * FILE: hal/halamd64/generic/x86bios.c + * PURPOSE: + * PROGRAMMERS: + */ + +/* INCLUDES ******************************************************************/ + +#include <hal.h> +//#define NDEBUG +#include <debug.h> + +NTSTATUS +NTAPI +x86BiosAllocateBuffer ( + ULONG *Size, + USHORT *Segment, + USHORT *Offset) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL;; + +} + +BOOLEAN +NTAPI +x86BiosCall ( + ULONG InterruptNumber, + X86_BIOS_REGISTERS *Registers) +{ + UNIMPLEMENTED; + return FALSE; +} + +NTSTATUS +NTAPI +x86BiosFreeBuffer ( + USHORT Segment, + USHORT Offset) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL;; +} + +NTSTATUS +x86BiosReadMemory ( + USHORT Segment, + USHORT Offset, + PVOID Buffer, + ULONG Size) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL;; +} + +NTSTATUS +NTAPI +x86BiosWriteMemory ( + USHORT Segment, + USHORT Offset, + PVOID Buffer, + ULONG Size) +{ + UNIMPLEMENTED; + return STATUS_UNSUCCESSFUL;; +} + Propchange: branches/ros-amd64-bringup/reactos/hal/halamd64/generic/x86bios.c ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/ros-amd64-bringup/reactos/include/ndk/halfuncs.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ndk/halfuncs.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ndk/halfuncs.h [iso-8859-1] Wed Dec 30 08:53:02 2009 @@ -274,5 +274,47 @@ IN PTIME_FIELDS RtcTime ); -#endif -#endif +// x86 BIOS emulator +#ifdef _X86BIOS_ +NTSTATUS +NTAPI +x86BiosAllocateBuffer ( + ULONG *Size, + USHORT *Segment, + USHORT *Offset +); + +BOOLEAN +NTAPI +x86BiosCall ( + ULONG InterruptNumber, + X86_BIOS_REGISTERS *Registers +); + +NTSTATUS +NTAPI +x86BiosFreeBuffer ( + USHORT Segment, + USHORT Offset +); + +NTSTATUS +x86BiosReadMemory ( + USHORT Segment, + USHORT Offset, + PVOID Buffer, + ULONG Size +); + +NTSTATUS +NTAPI +x86BiosWriteMemory ( + USHORT Segment, + USHORT Offset, + PVOID Buffer, + ULONG Size +); +#endif + +#endif +#endif Modified: branches/ros-amd64-bringup/reactos/include/ndk/haltypes.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/ndk/haltypes.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/ndk/haltypes.h [iso-8859-1] Wed Dec 30 08:53:02 2009 @@ -246,6 +246,19 @@ PVOID Spare8; } BUS_HANDLER; +#ifdef _X86BIOS_ +typedef struct _X86_BIOS_REGISTERS { + ULONG Eax; + ULONG Ecx; + ULONG Edx; + ULONG Ebx; + ULONG Ebp; + ULONG Esi; + ULONG Edi; + USHORT SegDs; + USHORT SegEs; +} X86_BIOS_REGISTERS, *PX86_BIOS_REGISTERS; +#endif // // HAL Chip Hacks //
14 years, 11 months
1
0
0
0
[jimtabor] 44806: [Win32k] - Setting up for region attribute support. - Removed old code and use GreDeleteObject for dc and region types.
by jimtabor@svn.reactos.org
Author: jimtabor Date: Tue Dec 29 22:07:04 2009 New Revision: 44806 URL:
http://svn.reactos.org/svn/reactos?rev=44806&view=rev
Log: [Win32k] - Setting up for region attribute support. - Removed old code and use GreDeleteObject for dc and region types. Modified: trunk/reactos/subsystems/win32/win32k/eng/engwindow.c trunk/reactos/subsystems/win32/win32k/include/dc.h trunk/reactos/subsystems/win32/win32k/include/region.h trunk/reactos/subsystems/win32/win32k/ntuser/painting.c trunk/reactos/subsystems/win32/win32k/ntuser/window.c trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c trunk/reactos/subsystems/win32/win32k/objects/dclife.c trunk/reactos/subsystems/win32/win32k/objects/dcstate.c trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c trunk/reactos/subsystems/win32/win32k/objects/region.c Modified: trunk/reactos/subsystems/win32/win32k/eng/engwindow.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/en…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/eng/engwindow.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/eng/engwindow.c [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -89,7 +89,7 @@ if (hVisRgn != NULL) { NtGdiOffsetRgn(hVisRgn, Window->Wnd->rcClient.left, Window->Wnd->rcClient.top); - visRgn = REGION_LockRgn(hVisRgn); + visRgn = RGNOBJAPI_Lock(hVisRgn, NULL); if (visRgn != NULL) { if (visRgn->rdh.nCount > 0) @@ -110,7 +110,7 @@ } } } - REGION_UnlockRgn(visRgn); + RGNOBJAPI_Unlock(visRgn); } else { Modified: trunk/reactos/subsystems/win32/win32k/include/dc.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/dc.h [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -144,7 +144,6 @@ HDC FASTCALL DC_AllocDC(PUNICODE_STRING Driver); VOID FASTCALL DC_InitDC(HDC DCToInit); HDC FASTCALL DC_FindOpenDC(PUNICODE_STRING Driver); -VOID FASTCALL DC_FreeDC(HDC); VOID FASTCALL DC_AllocateDcAttr(HDC); VOID FASTCALL DC_FreeDcAttr(HDC); BOOL INTERNAL_CALL DC_Cleanup(PVOID ObjectBody); Modified: trunk/reactos/subsystems/win32/win32k/include/region.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/region.h [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -48,6 +48,8 @@ INT FASTCALL IntGdiCombineRgn(PROSRGNDATA, PROSRGNDATA, PROSRGNDATA, INT); INT FASTCALL REGION_Complexity(PROSRGNDATA); PROSRGNDATA FASTCALL IntGdiCreateRectRgn(INT, INT, INT, INT); +PROSRGNDATA FASTCALL RGNOBJAPI_Lock(HRGN,PRGN_ATTR *); +VOID FASTCALL RGNOBJAPI_Unlock(PROSRGNDATA); #define UnsafeIntCreateRectRgnIndirect(prc) \ NtGdiCreateRectRgn((prc)->left, (prc)->top, (prc)->right, (prc)->bottom) Modified: trunk/reactos/subsystems/win32/win32k/ntuser/painting.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/painting.c [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -1006,10 +1006,10 @@ } else { - RgnData = REGION_LockRgn(Window->UpdateRegion); + RgnData = RGNOBJAPI_Lock(Window->UpdateRegion, NULL); ASSERT(RgnData != NULL); RegionType = REGION_GetRgnBox(RgnData, &Rect); - REGION_UnlockRgn(RgnData); + RGNOBJAPI_Unlock(RgnData); if (RegionType != ERROR && RegionType != NULLREGION) RECTL_bIntersectRect(&Rect, &Rect, &Window->Wnd->rcClient); Modified: trunk/reactos/subsystems/win32/win32k/ntuser/window.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/window.c [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -4557,10 +4557,10 @@ /* Copy the region into hRgn */ NtGdiCombineRgn(hRgn, VisRgn, NULL, RGN_COPY); - if((pRgn = REGION_LockRgn(hRgn))) + if((pRgn = RGNOBJAPI_Lock(hRgn, NULL))) { Ret = pRgn->rdh.iType; - REGION_UnlockRgn(pRgn); + RGNOBJAPI_Unlock(pRgn); } else Ret = ERROR; @@ -4596,11 +4596,11 @@ if(Window->WindowRegion && !(Wnd->style & WS_MINIMIZE)) NtGdiCombineRgn(VisRgn, VisRgn, Window->WindowRegion, RGN_AND); - if((pRgn = REGION_LockRgn(VisRgn))) + if((pRgn = RGNOBJAPI_Lock(VisRgn, NULL))) { Ret = pRgn->rdh.iType; *Rect = pRgn->rdh.rcBound; - REGION_UnlockRgn(pRgn); + RGNOBJAPI_Unlock(pRgn); } else Ret = ERROR; Modified: trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/winpos.c [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -953,16 +953,16 @@ VisBefore = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, TRUE); VisRgn = NULL; - if (VisBefore != NULL && (VisRgn = (PROSRGNDATA)REGION_LockRgn(VisBefore)) && + if (VisBefore != NULL && (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisBefore, NULL)) && REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION) { - REGION_UnlockRgn(VisRgn); + RGNOBJAPI_Unlock(VisRgn); GreDeleteObject(VisBefore); VisBefore = NULL; } else if(VisRgn) { - REGION_UnlockRgn(VisRgn); + RGNOBJAPI_Unlock(VisRgn); NtGdiOffsetRgn(VisBefore, -Window->Wnd->rcWindow.left, -Window->Wnd->rcWindow.top); } } @@ -1112,16 +1112,16 @@ VisAfter = VIS_ComputeVisibleRegion(Window, FALSE, FALSE, TRUE); VisRgn = NULL; - if (VisAfter != NULL && (VisRgn = (PROSRGNDATA)REGION_LockRgn(VisAfter)) && + if (VisAfter != NULL && (VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(VisAfter, NULL)) && REGION_GetRgnBox(VisRgn, &TempRect) == NULLREGION) { - REGION_UnlockRgn(VisRgn); + RGNOBJAPI_Unlock(VisRgn); GreDeleteObject(VisAfter); VisAfter = NULL; } else if(VisRgn) { - REGION_UnlockRgn(VisRgn); + RGNOBJAPI_Unlock(VisRgn); NtGdiOffsetRgn(VisAfter, -Window->Wnd->rcWindow.left, -Window->Wnd->rcWindow.top); } @@ -1156,9 +1156,9 @@ RECTL_vOffsetRect(&ORect, - OldWindowRect.left, - OldWindowRect.top); RECTL_vOffsetRect(&NRect, - NewWindowRect.left, - NewWindowRect.top); RECTL_bIntersectRect(&CopyRect, &ORect, &NRect); - pCopyRgn = REGION_LockRgn(CopyRgn); + pCopyRgn = RGNOBJAPI_Lock(CopyRgn, NULL); REGION_CropAndOffsetRegion(pCopyRgn, pCopyRgn, &CopyRect, NULL); - REGION_UnlockRgn(pCopyRgn); + RGNOBJAPI_Unlock(pCopyRgn); } /* No use in copying bits which are in the update region. */ @@ -1174,11 +1174,11 @@ * there's nothing to copy. Also, it's no use copying bits onto * themselves. */ - if ((VisRgn = (PROSRGNDATA)REGION_LockRgn(CopyRgn)) && + if ((VisRgn = (PROSRGNDATA)RGNOBJAPI_Lock(CopyRgn, NULL)) && REGION_GetRgnBox(VisRgn, &CopyRect) == NULLREGION) { /* Nothing to copy, clean up */ - REGION_UnlockRgn(VisRgn); + RGNOBJAPI_Unlock(VisRgn); GreDeleteObject(CopyRgn); CopyRgn = NULL; } @@ -1187,7 +1187,7 @@ { if(VisRgn) { - REGION_UnlockRgn(VisRgn); + RGNOBJAPI_Unlock(VisRgn); } /* @@ -1214,7 +1214,7 @@ } else if(VisRgn) { - REGION_UnlockRgn(VisRgn); + RGNOBJAPI_Unlock(VisRgn); } } else Modified: trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/cliprgn.c [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -36,7 +36,7 @@ NtGdiCombineRgn(Dc->rosdc.hGCClipRgn, Dc->rosdc.hClipRgn, Dc->rosdc.hVisRgn, RGN_AND); NtGdiOffsetRgn(Dc->rosdc.hGCClipRgn, Dc->ptlDCOrig.x, Dc->ptlDCOrig.y); - if((CombinedRegion = REGION_LockRgn(Dc->rosdc.hGCClipRgn))) + if((CombinedRegion = RGNOBJAPI_Lock(Dc->rosdc.hGCClipRgn, NULL))) { if (Dc->rosdc.CombinedClip != NULL) IntEngDeleteClipRegion(Dc->rosdc.CombinedClip); @@ -46,7 +46,7 @@ CombinedRegion->Buffer, &CombinedRegion->rdh.rcBound); - REGION_UnlockRgn(CombinedRegion); + RGNOBJAPI_Unlock(CombinedRegion); } if ( NULL == Dc->rosdc.CombinedClip ) @@ -123,10 +123,10 @@ { PROSRGNDATA Rgn; RECTL rect; - if((Rgn = REGION_LockRgn(dc->rosdc.hVisRgn))) + if((Rgn = RGNOBJAPI_Lock(dc->rosdc.hVisRgn, NULL))) { REGION_GetRgnBox(Rgn, &rect); - REGION_UnlockRgn(Rgn); + RGNOBJAPI_Unlock(Rgn); dc->rosdc.hClipRgn = UnsafeIntCreateRectRgnIndirect(&rect); } else @@ -177,13 +177,13 @@ return ERROR; } - if (!(Rgn = REGION_LockRgn(dc->rosdc.hGCClipRgn))) + if (!(Rgn = RGNOBJAPI_Lock(dc->rosdc.hGCClipRgn, NULL))) { DC_UnlockDc(dc); return ERROR; } retval = REGION_GetRgnBox(Rgn, rc); - REGION_UnlockRgn(Rgn); + RGNOBJAPI_Unlock(Rgn); IntDPtoLP(dc, (LPPOINT)rc, 2); DC_UnlockDc(dc); @@ -407,11 +407,11 @@ if (dc->rosdc.hGCClipRgn) { - if((Rgn = (PROSRGNDATA)REGION_LockRgn(dc->rosdc.hGCClipRgn))) + if((Rgn = (PROSRGNDATA)RGNOBJAPI_Lock(dc->rosdc.hGCClipRgn, NULL))) { IntLPtoDP(dc, (LPPOINT)&Rect, 2); Result = REGION_RectInRegion(Rgn, &Rect); - REGION_UnlockRgn(Rgn); + RGNOBJAPI_Unlock(Rgn); } } DC_UnlockDc(dc); Modified: trunk/reactos/subsystems/win32/win32k/objects/dclife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dclife.c [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -133,23 +133,6 @@ NewDC->dclevel.pSurface = SURFACE_ShareLockSurface(hsurf); return NewDC; -} - -VOID FASTCALL -DC_FreeDC(HDC DCToFree) -{ - DC_FreeDcAttr(DCToFree); - if (!IsObjectDead(DCToFree)) - { - if (!GDIOBJ_FreeObjByHandle(DCToFree, GDI_OBJECT_TYPE_DC)) - { - DPRINT1("DC_FreeDC failed\n"); - } - } - else - { - DPRINT1("Attempted to Delete 0x%x currently being destroyed!!!\n",DCToFree); - } } BOOL INTERNAL_CALL @@ -537,7 +520,7 @@ PATH_Delete(DCToDelete->dclevel.hPath); DC_UnlockDc(DCToDelete); - DC_FreeDC(hDC); + GreDeleteObject(hDC); return TRUE; } Modified: trunk/reactos/subsystems/win32/win32k/objects/dcstate.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/dcstate.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/dcstate.c [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -180,7 +180,7 @@ } /* Delete the saved dc */ - DC_FreeDC(hdcSave); + GreDeleteObject(hdcSave); } DC_UnlockDc(pdc); Modified: trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/gdiobj.c [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -663,11 +663,34 @@ FASTCALL GreDeleteObject(HGDIOBJ hObject) { + INT Index; + PGDI_TABLE_ENTRY Entry; + DWORD dwObjectType; + PVOID pAttr = NULL; + DPRINT("NtGdiDeleteObject handle 0x%08x\n", hObject); if (!IsObjectDead(hObject)) { - return NULL != hObject - ? GDIOBJ_FreeObjByHandle(hObject, GDI_OBJECT_TYPE_DONTCARE) : FALSE; + dwObjectType = GDIOBJ_GetObjectType(hObject); + + Index = GDI_HANDLE_GET_INDEX(hObject); + Entry = &GdiHandleTable->Entries[Index]; + pAttr = Entry->UserData; + + switch (dwObjectType) + { +// case GDI_OBJECT_TYPE_BRUSH: + case GDI_OBJECT_TYPE_REGION: + if (pAttr) FreeObjectAttr(pAttr); + break; + + case GDI_OBJECT_TYPE_DC: + DC_FreeDcAttr(hObject); + break; + } + + return NULL != hObject + ? GDIOBJ_FreeObjByHandle(hObject, dwObjectType) : FALSE; } else { Modified: trunk/reactos/subsystems/win32/win32k/objects/region.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/region.c [iso-8859-1] Tue Dec 29 22:07:04 2009 @@ -467,7 +467,7 @@ { ROSRGNDATA *Data; - Data = REGION_LockRgn(hRgn); + Data = RGNOBJAPI_Lock(hRgn, NULL); if (Data == NULL) { DbgPrint("IntDumpRegion called with invalid region!\n"); @@ -482,7 +482,7 @@ Data->rdh.rcBound.bottom, Data->rdh.iType); - REGION_UnlockRgn(Data); + RGNOBJAPI_Unlock(Data); } #endif /* not NDEBUG */ @@ -1739,7 +1739,7 @@ trb = REGION_AllocRgnWithHandle(srb->rdh.nCount + 1); if (!trb) { - REGION_UnlockRgn(tra); + RGNOBJAPI_Unlock(tra); GreDeleteObject(htra); return; } @@ -1748,8 +1748,8 @@ REGION_SubtractRegion(tra, sra, srb); REGION_SubtractRegion(trb, srb, sra); REGION_UnionRegion(dr, tra, trb); - REGION_UnlockRgn(tra); - REGION_UnlockRgn(trb); + RGNOBJAPI_Unlock(tra); + RGNOBJAPI_Unlock(trb); GreDeleteObject(htra); GreDeleteObject(htrb); @@ -1863,26 +1863,26 @@ PRECTL rc; ULONG i; - if (!(srcObj = REGION_LockRgn(hSrc))) + if (!(srcObj = RGNOBJAPI_Lock(hSrc, NULL))) { return FALSE; } if (!REGION_NOT_EMPTY(srcObj)) { - REGION_UnlockRgn(srcObj); + RGNOBJAPI_Unlock(srcObj); return FALSE; } - if (!(destObj = REGION_LockRgn(hDest))) - { - REGION_UnlockRgn(srcObj); + if (!(destObj = RGNOBJAPI_Lock(hDest, NULL))) + { + RGNOBJAPI_Unlock(srcObj); return FALSE; } EMPTY_REGION(destObj); if (!REGION_CopyRegion(destObj, srcObj)) { - REGION_UnlockRgn(destObj); - REGION_UnlockRgn(srcObj); + RGNOBJAPI_Unlock(destObj); + RGNOBJAPI_Unlock(srcObj); return FALSE; } @@ -1891,8 +1891,8 @@ if (!REGION_CreateSimpleFrameRgn(destObj, x, y)) { EMPTY_REGION(destObj); - REGION_UnlockRgn(destObj); - REGION_UnlockRgn(srcObj); + RGNOBJAPI_Unlock(destObj); + RGNOBJAPI_Unlock(srcObj); return FALSE; } } @@ -1951,8 +1951,8 @@ REGION_SubtractRegion(destObj, srcObj, destObj); } - REGION_UnlockRgn(destObj); - REGION_UnlockRgn(srcObj); + RGNOBJAPI_Unlock(destObj); + RGNOBJAPI_Unlock(srcObj); return TRUE; } @@ -1986,11 +1986,11 @@ goto done; } - if ( !(srcObj = REGION_LockRgn(hSrc)) ) + if ( !(srcObj = RGNOBJAPI_Lock(hSrc, NULL)) ) goto done; - if ( !(destObj = REGION_LockRgn(hDest)) ) - { - REGION_UnlockRgn(srcObj); + if ( !(destObj = RGNOBJAPI_Lock(hDest, NULL)) ) + { + RGNOBJAPI_Unlock(srcObj); goto done; } EMPTY_REGION(destObj); @@ -2021,8 +2021,8 @@ } ret = TRUE; - REGION_UnlockRgn(srcObj); - REGION_UnlockRgn(destObj); + RGNOBJAPI_Unlock(srcObj); + RGNOBJAPI_Unlock(destObj); done: return ret; @@ -2054,7 +2054,7 @@ pReg->Buffer = ExAllocatePoolWithTag(PagedPool, nReg * sizeof(RECT), TAG_REGION); if (!pReg->Buffer) { - REGION_UnlockRgn(pReg); + RGNOBJAPI_Unlock(pReg); GDIOBJ_FreeObjByHandle(hReg, GDI_OBJECT_TYPE_REGION); return NULL; } @@ -2264,17 +2264,21 @@ } else if (src2Rgn == NULL) { - DPRINT1("IntGdiCombineRgn requires hSrc2 != NULL for combine mode %d!\n", CombineMode); - SetLastWin32Error(ERROR_INVALID_HANDLE); + DPRINT1("IntGdiCombineRgn requires hSrc2 != NULL for combine mode %d!\n", CombineMode); + SetLastWin32Error(ERROR_INVALID_HANDLE); } } + } + else + { + DPRINT("IntGdiCombineRgn: hSrc1 unavailable\n"); + SetLastWin32Error(ERROR_INVALID_HANDLE); } } else { DPRINT("IntGdiCombineRgn: hDest unavailable\n"); SetLastWin32Error(ERROR_INVALID_HANDLE); - result = ERROR; } return result; } @@ -2297,30 +2301,30 @@ return ERROR; } - destRgn = REGION_LockRgn(hDest); + destRgn = RGNOBJAPI_Lock(hDest, NULL); if (!destRgn) { SetLastWin32Error(ERROR_INVALID_HANDLE); return ERROR; } - src1Rgn = REGION_LockRgn(hSrc1); + src1Rgn = RGNOBJAPI_Lock(hSrc1, NULL); if (!src1Rgn) { - REGION_UnlockRgn(destRgn); + RGNOBJAPI_Unlock(destRgn); SetLastWin32Error(ERROR_INVALID_HANDLE); return ERROR; } if (hSrc2) - src2Rgn = REGION_LockRgn(hSrc2); + src2Rgn = RGNOBJAPI_Lock(hSrc2, NULL); result = IntGdiCombineRgn( destRgn, src1Rgn, src2Rgn, CombineMode); if (src2Rgn) - REGION_UnlockRgn(src2Rgn); - REGION_UnlockRgn(src1Rgn); - REGION_UnlockRgn(destRgn); + RGNOBJAPI_Unlock(src2Rgn); + RGNOBJAPI_Unlock(src1Rgn); + RGNOBJAPI_Unlock(destRgn); return result; } @@ -2347,7 +2351,7 @@ if (!(pRgn = REGION_AllocRgnWithHandle(1))) return NULL; REGION_SetRectRgn(pRgn, LeftRect, TopRect, RightRect, BottomRect); - REGION_UnlockRgn(pRgn); + RGNOBJAPI_Unlock(pRgn); // Return pointer with Share locks. pRgn = GDIOBJ_ShareLockObj(pRgn->BaseObject.hHmgr, GDI_OBJECT_TYPE_REGION); @@ -2370,7 +2374,7 @@ hRgn = pRgn->BaseObject.hHmgr; REGION_SetRectRgn(pRgn, LeftRect, TopRect, RightRect, BottomRect); - REGION_UnlockRgn(pRgn); + RGNOBJAPI_Unlock(pRgn); return hRgn; } @@ -2490,7 +2494,7 @@ REGION_UnionRectWithRgn(obj, &rect); } - REGION_UnlockRgn(obj); + RGNOBJAPI_Unlock(obj); return hrgn; } @@ -2506,12 +2510,12 @@ ULONG i; BOOL bRet = FALSE; - if ( !(rgn1 = REGION_LockRgn(hSrcRgn1)) ) + if ( !(rgn1 = RGNOBJAPI_Lock(hSrcRgn1, NULL)) ) return ERROR; - if ( !(rgn2 = REGION_LockRgn(hSrcRgn2)) ) - { - REGION_UnlockRgn(rgn1); + if ( !(rgn2 = RGNOBJAPI_Lock(hSrcRgn2, NULL)) ) + { + RGNOBJAPI_Unlock(rgn1); return ERROR; } @@ -2540,8 +2544,8 @@ bRet = TRUE; exit: - REGION_UnlockRgn(rgn1); - REGION_UnlockRgn(rgn2); + RGNOBJAPI_Unlock(rgn1); + RGNOBJAPI_Unlock(rgn2); return bRet; } @@ -2637,12 +2641,12 @@ if (!NT_SUCCESS(Status)) { SetLastWin32Error(ERROR_INVALID_PARAMETER); - REGION_UnlockRgn(Region); + RGNOBJAPI_Unlock(Region); GreDeleteObject(hRgn); return NULL; } - REGION_UnlockRgn(Region); + RGNOBJAPI_Unlock(Region); return hRgn; } @@ -2659,14 +2663,14 @@ PROSRGNDATA rgn; PRECTL r; - if (NULL == (rgn = REGION_LockRgn(hRgn))) + if (NULL == (rgn = RGNOBJAPI_Lock(hRgn, NULL))) { return FALSE; } if (NULL == (oldhBrush = NtGdiSelectBrush(hDC, hBrush))) { - REGION_UnlockRgn(rgn); + RGNOBJAPI_Unlock(rgn); return FALSE; } @@ -2675,7 +2679,7 @@ NtGdiPatBlt(hDC, r->left, r->top, r->right - r->left, r->bottom - r->top, PATCOPY); } - REGION_UnlockRgn(rgn); + RGNOBJAPI_Unlock(rgn); NtGdiSelectBrush(hDC, oldhBrush); return TRUE; @@ -2816,13 +2820,13 @@ PROSRGNDATA Rgn; DWORD ret; - if (!(Rgn = REGION_LockRgn(hRgn))) + if (!(Rgn = RGNOBJAPI_Lock(hRgn, NULL))) { return ERROR; } ret = REGION_GetRgnBox(Rgn, pRect); - REGION_UnlockRgn(Rgn); + RGNOBJAPI_Unlock(Rgn); return ret; } @@ -2839,13 +2843,13 @@ DWORD ret; NTSTATUS Status = STATUS_SUCCESS; - if (!(Rgn = REGION_LockRgn(hRgn))) + if (!(Rgn = RGNOBJAPI_Lock(hRgn, NULL))) { return ERROR; } ret = REGION_GetRgnBox(Rgn, &SafeRect); - REGION_UnlockRgn(Rgn); + RGNOBJAPI_Unlock(Rgn); if (ERROR == ret) { return ret; @@ -2880,7 +2884,7 @@ ULONG i; PRECTL rc; - if (!(RgnData = REGION_LockRgn(hRgn))) + if (!(RgnData = RGNOBJAPI_Lock(hRgn, NULL))) { SetLastWin32Error(ERROR_INVALID_HANDLE); return FALSE; @@ -2892,13 +2896,13 @@ if (!NtGdiPatBlt(hDC, rc->left, rc->top, rc->right - rc->left, rc->bottom - rc->top, DSTINVERT)) { - REGION_UnlockRgn(RgnData); + RGNOBJAPI_Unlock(RgnData); return FALSE; } rc++; } - REGION_UnlockRgn(RgnData); + RGNOBJAPI_Unlock(RgnData); return TRUE; } @@ -2910,7 +2914,7 @@ INT YOffset ) { - PROSRGNDATA rgn = REGION_LockRgn(hRgn); + PROSRGNDATA rgn = RGNOBJAPI_Lock(hRgn, NULL); INT ret; DPRINT("NtGdiOffsetRgn: hRgn %d Xoffs %d Yoffs %d rgn %x\n", hRgn, XOffset, YOffset, rgn ); @@ -2946,7 +2950,7 @@ } } ret = REGION_Complexity(rgn); - REGION_UnlockRgn(rgn); + RGNOBJAPI_Unlock(rgn); return ret; } @@ -2982,7 +2986,7 @@ NtGdiCombineRgn(tmpVisRgn, tmpVisRgn, dc->rosdc.hGCClipRgn, RGN_AND); - visrgn = REGION_LockRgn(tmpVisRgn); + visrgn = RGNOBJAPI_Lock(tmpVisRgn, NULL); if (visrgn == NULL) { GreDeleteObject(tmpVisRgn); @@ -3005,7 +3009,7 @@ &BrushOrigin, 0xFFFF);//FIXME:don't know what to put here - REGION_UnlockRgn(visrgn); + RGNOBJAPI_Unlock(visrgn); GreDeleteObject(tmpVisRgn); // Fill the region @@ -3024,7 +3028,7 @@ ULONG i; PRECTL r; - if (!(rgn = REGION_LockRgn(hRgn) ) ) + if (!(rgn = RGNOBJAPI_Lock(hRgn, NULL) ) ) return FALSE; if (rgn->rdh.nCount > 0 && INRECT(rgn->rdh.rcBound, X, Y)) @@ -3034,13 +3038,13 @@ { if (INRECT(*r, X, Y)) { - REGION_UnlockRgn(rgn); + RGNOBJAPI_Unlock(rgn); return TRUE; } r++; } } - REGION_UnlockRgn(rgn); + RGNOBJAPI_Unlock(rgn); return FALSE; } @@ -3108,7 +3112,7 @@ BOOL Ret; NTSTATUS Status = STATUS_SUCCESS; - if (!(Rgn = REGION_LockRgn(hRgn))) + if (!(Rgn = RGNOBJAPI_Lock(hRgn, NULL))) { return ERROR; } @@ -3126,14 +3130,14 @@ if (!NT_SUCCESS(Status)) { - REGION_UnlockRgn(Rgn); + RGNOBJAPI_Unlock(Rgn); SetLastNtError(Status); DPRINT1("NtGdiRectInRegion: bogus rc\n"); return ERROR; } Ret = REGION_RectInRegion(Rgn, &rc); - REGION_UnlockRgn(Rgn); + RGNOBJAPI_Unlock(Rgn); return Ret; } @@ -3189,14 +3193,14 @@ { PROSRGNDATA rgn; - if ( !(rgn = REGION_LockRgn(hRgn)) ) + if ( !(rgn = RGNOBJAPI_Lock(hRgn, NULL)) ) { return 0; //per documentation } REGION_SetRectRgn(rgn, LeftRect, TopRect, RightRect, BottomRect); - REGION_UnlockRgn(rgn); + RGNOBJAPI_Unlock(rgn); return TRUE; } @@ -3210,7 +3214,7 @@ PROSRGNDATA Rgn; NTSTATUS Status = STATUS_SUCCESS; - if (!(Rgn = REGION_LockRgn(hDest))) + if (!(Rgn = RGNOBJAPI_Lock(hDest, NULL))) { SetLastWin32Error(ERROR_INVALID_HANDLE); return NULL; @@ -3229,13 +3233,13 @@ if (! NT_SUCCESS(Status)) { - REGION_UnlockRgn(Rgn); + RGNOBJAPI_Unlock(Rgn); SetLastNtError(Status); return NULL; } REGION_UnionRectWithRgn(Rgn, &SafeRect); - REGION_UnlockRgn(Rgn); + RGNOBJAPI_Unlock(Rgn); return hDest; } @@ -3257,7 +3261,7 @@ ) { DWORD size; - PROSRGNDATA obj = REGION_LockRgn(hrgn); + PROSRGNDATA obj = RGNOBJAPI_Lock(hrgn, NULL); NTSTATUS Status = STATUS_SUCCESS; if (!obj) @@ -3266,7 +3270,7 @@ size = obj->rdh.nCount * sizeof(RECT); if (count < (size + sizeof(RGNDATAHEADER)) || rgndata == NULL) { - REGION_UnlockRgn(obj); + RGNOBJAPI_Unlock(obj); if (rgndata) /* buffer is too small, signal it by return 0 */ return 0; else /* user requested buffer size with rgndata NULL */ @@ -3288,11 +3292,11 @@ if (!NT_SUCCESS(Status)) { SetLastNtError(Status); - REGION_UnlockRgn(obj); + RGNOBJAPI_Unlock(obj); return 0; } - REGION_UnlockRgn(obj); + RGNOBJAPI_Unlock(obj); return size + sizeof(RGNDATAHEADER); } @@ -3778,7 +3782,7 @@ (Pts[2].x == Pts[3].x) && (Pts[3].y == Pts[0].y)))) { - REGION_UnlockRgn(region); + RGNOBJAPI_Unlock(region); NtGdiSetRectRgn(hrgn, min(Pts[0].x, Pts[2].x), min(Pts[0].y, Pts[2].y), max(Pts[0].x, Pts[2].x), max(Pts[0].y, Pts[2].y)); return hrgn; @@ -3927,7 +3931,7 @@ curPtBlock = tmpPtBlock; } ExFreePoolWithTag(pETEs, TAG_REGION); - REGION_UnlockRgn(region); + RGNOBJAPI_Unlock(region); return hrgn; }
14 years, 11 months
1
0
0
0
[hpoussin] 44805: [freeldr] Never unmap hyperspace or HAL entries. Fixes boot problems with more than 1GB of RAM
by hpoussin@svn.reactos.org
Author: hpoussin Date: Tue Dec 29 21:43:01 2009 New Revision: 44805 URL:
http://svn.reactos.org/svn/reactos?rev=44805&view=rev
Log: [freeldr] Never unmap hyperspace or HAL entries. Fixes boot problems with more than 1GB of RAM Modified: trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c Modified: trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/i386/wlmemory.c [iso-8859-1] Tue Dec 29 21:43:01 2009 @@ -207,6 +207,10 @@ { PHARDWARE_PTE KernelPT; ULONG Entry = (Page >> 10) + (KSEG0_BASE >> 22); + + /* Don't unmap hyperspace or HAL entries */ + if (Entry == HYPER_SPACE_ENTRY || Entry == 1023) + return; if (PDE[Entry].Valid) {
14 years, 11 months
1
0
0
0
[fireball] 44804: - Cleanup swm.c from commented out code, 26KB -> 22KB. - Make unhiding debug print show the window rect.
by fireball@svn.reactos.org
Author: fireball Date: Tue Dec 29 20:40:54 2009 New Revision: 44804 URL:
http://svn.reactos.org/svn/reactos?rev=44804&view=rev
Log: - Cleanup swm.c from commented out code, 26KB -> 22KB. - Make unhiding debug print show the window rect. Modified: branches/arwinss/reactos/subsystems/win32/win32k/swm/winman.c 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] Tue Dec 29 20:40:54 2009 @@ -23,7 +23,6 @@ PSWM_WINDOW NTAPI SwmGetTopWindow(); VOID NTAPI SwmClipAllWindows(); -VOID NTAPI SwmDrawAllWindows(); VOID NTAPI SwmDumpRegion(struct region *Region); VOID NTAPI SwmDumpWindows(); @@ -294,34 +293,6 @@ } } -VOID -NTAPI -SwmDrawAllWindows() -{ - PLIST_ENTRY Current; - PSWM_WINDOW Window; - - /* Traverse the list to find our window */ - Current = SwmWindows.Flink; - while(Current != &SwmWindows) - { - Window = CONTAINING_RECORD(Current, SWM_WINDOW, Entry); - - /* Skip hidden windows */ - if (Window->Hidden) - { - /* Advance to the next window */ - Current = Current->Flink; - continue; - } - - /* Draw its visible region */ - SwmInvalidateRegion(Window, Window->Visible, NULL); - - /* Advance to the next window */ - Current = Current->Flink; - } -} VOID NTAPI @@ -503,9 +474,6 @@ SwmBringToFront(PSWM_WINDOW SwmWin) { PSWM_WINDOW Previous; -#ifdef INCREMENTAL_CLIPPING - struct region *OldVisible; -#endif /* Save previous focus window */ Previous = SwmGetTopWindow(); @@ -524,40 +492,15 @@ /* Add it to the head of the list */ InsertHeadList(&SwmWindows, &SwmWin->Entry); - -#ifdef INCREMENTAL_CLIPPING - /* Subtract old visible from the new one to find region for updating */ - OldVisible = create_empty_region(); - set_region_rect(OldVisible, &SwmWin->Window); - - subtract_region(OldVisible, OldVisible, SwmWin->Visible); /* Make it fully visible */ free_region(SwmWin->Visible); SwmWin->Visible = create_empty_region(); set_region_rect(SwmWin->Visible, &SwmWin->Window); - /* If update region is not empty - draw missing parts */ - if (!is_region_empty(OldVisible)) - { - DPRINT("Intersection isn't empty\n"); - SwmInvalidateRegion(SwmWin, OldVisible, NULL); - } - - free_region(OldVisible); - - /* Update previous window's visible region */ - SwmRecalculateVisibility(Previous); -#else - /* Make it fully visible */ - free_region(SwmWin->Visible); - SwmWin->Visible = create_empty_region(); - set_region_rect(SwmWin->Visible, &SwmWin->Window); - // TODO: Redraw only new parts! SwmClipAllWindows(); SwmInvalidateRegion(SwmWin, SwmWin->Visible, NULL); -#endif } VOID @@ -596,10 +539,6 @@ SwmPosChanged(HWND hWnd, const RECT *WindowRect, const RECT *OldRect) { PSWM_WINDOW SwmWin; -#ifdef INCREMENTAL_CLIPPING - struct region *NewRegion; - rectangle_t WinRect; -#endif /* Acquire the lock */ SwmAcquire(); @@ -630,36 +569,9 @@ SwmWin->Window.top = WindowRect->top; SwmWin->Window.right = WindowRect->right; SwmWin->Window.bottom = WindowRect->bottom; -#ifdef INCREMENTAL_CLIPPING - //SwmDebugDrawWindows(); - - /* Assure the moving window is foreground */ - ASSERT(SwmWindows.Flink == &SwmWin->Entry); - - /* Create a region describing new position */ - NewRegion = create_empty_region(); - WinRect.left = WindowRect->left; WinRect.top = WindowRect->top; - WinRect.right = WindowRect->right; WinRect.bottom = WindowRect->bottom; - set_region_rect(NewRegion, &WinRect); - - /* Intersect it with the old region */ - intersect_region(NewRegion, NewRegion, SwmWin->Visible); - - /* This window's visibility region will just move, because it - really equals window's rect. */ - offset_region(SwmWin->Visible, - WindowRect->left - OldRect->left, - WindowRect->top - OldRect->top); - - /* NewRegion now holds the difference. Mark it visible. */ - SwmMarkVisible(NewRegion); - free_region(NewRegion); - - /* Redraw window itself too */ - //SwmInvalidateRegion(SwmWin, SwmWin->Visible, NULL); -#else + + /* Recalculate all clipping */ SwmClipAllWindows(); -#endif /* Release the lock */ SwmRelease(); @@ -689,7 +601,7 @@ if (Show && Win->Hidden) { /* Change state from hidden to visible */ - DPRINT1("Unhiding %x\n", Win->hwnd); + DPRINT1("Unhiding %x, rect (%d,%d)-(%d,%d)\n", Win->hwnd, Win->Window.left, Win->Window.top, Win->Window.right, Win->Window.bottom); Win->Hidden = FALSE; SwmBringToFront(Win); }
14 years, 11 months
1
0
0
0
[gschneider] 44803: [win32k] - Add mask offset coordinates to GreStretchBltMask parameters, add code to handle a mask offset - Only fail if the mask is smaller than the color bitmap, print sizes in this case - Adapt callers to GreStretchBltMask changes - DrawIcon: use new features to combine mask and color images - Mouse control panel now shows cursors again (masks still need some work), fixes ~15 user32:cursoricon tests
by gschneider@svn.reactos.org
Author: gschneider Date: Tue Dec 29 19:21:00 2009 New Revision: 44803 URL:
http://svn.reactos.org/svn/reactos?rev=44803&view=rev
Log: [win32k] - Add mask offset coordinates to GreStretchBltMask parameters, add code to handle a mask offset - Only fail if the mask is smaller than the color bitmap, print sizes in this case - Adapt callers to GreStretchBltMask changes - DrawIcon: use new features to combine mask and color images - Mouse control panel now shows cursors again (masks still need some work), fixes ~15 user32:cursoricon tests Modified: trunk/reactos/subsystems/win32/win32k/include/intgdi.h trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c trunk/reactos/subsystems/win32/win32k/objects/bitblt.c Modified: trunk/reactos/subsystems/win32/win32k/include/intgdi.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/in…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/include/intgdi.h [iso-8859-1] Tue Dec 29 19:21:00 2009 @@ -258,7 +258,9 @@ IN INT cySrc, IN DWORD dwRop, IN DWORD dwBackColor, - IN HDC hdcMask); + IN HDC hdcMask, + IN INT xMask, + IN INT yMask); #endif /* _WIN32K_INTGDI_H */ Modified: trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] Tue Dec 29 19:21:00 2009 @@ -1362,13 +1362,14 @@ cyHeight, hdcImage ? hdcImage : hdcMask, 0, - ((diFlags & DI_MASK && !(diFlags & DI_IMAGE)) || - (diFlags & DI_IMAGE && hbmColor) ? 0 : IconSize.cy), + 0, IconSize.cx, IconSize.cy, SRCCOPY, 0, - hdcImage ? hdcMask : NULL); + hdcMask, + 0, + hdcImage ? 0 : IconSize.cy); } if (hOldMask) NtGdiSelectBitmap(hdcMask, hOldMask); Modified: trunk/reactos/subsystems/win32/win32k/objects/bitblt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/ob…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/objects/bitblt.c [iso-8859-1] Tue Dec 29 19:21:00 2009 @@ -703,7 +703,9 @@ INT HeightSrc, DWORD ROP, IN DWORD dwBackColor, - HDC hDCMask) + HDC hDCMask, + INT XOriginMask, + INT YOriginMask) { PDC DCDest; PDC DCSrc = NULL; @@ -713,6 +715,7 @@ SURFACE *BitmapMask = NULL; RECTL DestRect; RECTL SourceRect; + POINTL MaskPoint; BOOL Status = FALSE; EXLATEOBJ exlo; XLATEOBJ *XlateObj = NULL; @@ -827,12 +830,20 @@ { BitmapMask = DCMask->dclevel.pSurface; if (BitmapMask && - (BitmapMask->SurfObj.sizlBitmap.cx != WidthSrc || - BitmapMask->SurfObj.sizlBitmap.cy != HeightSrc)) + (BitmapMask->SurfObj.sizlBitmap.cx < WidthSrc || + BitmapMask->SurfObj.sizlBitmap.cy < HeightSrc)) { - DPRINT1("Mask and bitmap sizes don't match!\n"); + DPRINT1("%dx%d mask is smaller than %dx%d bitmap\n", + BitmapMask->SurfObj.sizlBitmap.cx, BitmapMask->SurfObj.sizlBitmap.cy, + WidthSrc, HeightSrc); goto failed; } + /* Create mask offset point */ + MaskPoint.x = XOriginMask; + MaskPoint.y = YOriginMask; + IntLPtoDP(DCMask, &MaskPoint, 1); + MaskPoint.x += DCMask->ptlDCOrig.x; + MaskPoint.y += DCMask->ptlDCOrig.x; } } @@ -844,7 +855,7 @@ XlateObj, &DestRect, &SourceRect, - NULL, + BitmapMask ? &MaskPoint : NULL, &DCDest->eboFill.BrushObject, &BrushOrigin, ROP3_TO_ROP4(ROP)); @@ -896,7 +907,9 @@ HeightSrc, ROP, dwBackColor, - NULL); + NULL, + 0, + 0); }
14 years, 12 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
51
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
Results per page:
10
25
50
100
200