Author: jgardou
Date: Wed Jul 14 20:28:06 2010
New Revision: 48049
URL:
http://svn.reactos.org/svn/reactos?rev=48049&view=rev
Log:
Push sync to 48046, this time with cursoricon.c
Modified:
branches/reactos-yarotows/include/reactos/winsock/msafd.h (props changed)
branches/reactos-yarotows/include/reactos/winsock/msafdlib.h (props changed)
branches/reactos-yarotows/include/reactos/winsock/mswinsock.h (props changed)
branches/reactos-yarotows/include/reactos/winsock/rnr20lib.h (props changed)
branches/reactos-yarotows/include/reactos/winsock/wsmobile.h (props changed)
branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c
Propchange: branches/reactos-yarotows/include/reactos/winsock/msafd.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 14 20:28:06 2010
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/include/reactos/winsock/msafd.h:34711-34712,34743,34780-34782,34812,34839,34842,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35683,35739,35746,35762,35771,35777,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36172,36360,36388-36389,36445,36502-36503,36505,36570,36614,36899,36930,36936,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148-38151,38264-38265,38268,38355,39151,39333,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43838-43840,43857-43858,43860,43905-43907,43969,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338,44389,44391,44426,44460,44530,44540,44601
-/trunk/reactos/include/reactos/winsock/msafd.h:44354-45543
+/trunk/reactos/include/reactos/winsock/msafd.h:44354-45543,48010-48040
Propchange: branches/reactos-yarotows/include/reactos/winsock/msafdlib.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 14 20:28:06 2010
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/include/reactos/winsock/msafdlib.h:34711-34712,34743,34780-34782,34812,34839,34842,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35683,35739,35746,35762,35771,35777,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36172,36360,36388-36389,36445,36502-36503,36505,36570,36614,36899,36930,36936,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148-38151,38264-38265,38268,38355,39151,39333,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43838-43840,43857-43858,43860,43905-43907,43969,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338,44389,44391,44426,44460,44530,44540,44601
-/trunk/reactos/include/reactos/winsock/msafdlib.h:44354-45543
+/trunk/reactos/include/reactos/winsock/msafdlib.h:44354-45543,48010-48040
Propchange: branches/reactos-yarotows/include/reactos/winsock/mswinsock.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 14 20:28:06 2010
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/include/reactos/winsock/mswinsock.h:34711-34712,34743,34780-34782,34812,34839,34842,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35683,35739,35746,35762,35771,35777,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36172,36360,36388-36389,36445,36502-36503,36505,36570,36614,36899,36930,36936,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148-38151,38264-38265,38268,38355,39151,39333,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43838-43840,43857-43858,43860,43905-43907,43969,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338,44389,44391,44426,44460,44530,44540,44601
-/trunk/reactos/include/reactos/winsock/mswinsock.h:44354-45543
+/trunk/reactos/include/reactos/winsock/mswinsock.h:44354-45543,48010-48040
Propchange: branches/reactos-yarotows/include/reactos/winsock/rnr20lib.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 14 20:28:06 2010
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/include/reactos/winsock/rnr20lib.h:34711-34712,34743,34780-34782,34812,34839,34842,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35683,35739,35746,35762,35771,35777,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36172,36360,36388-36389,36445,36502-36503,36505,36570,36614,36899,36930,36936,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148-38151,38264-38265,38268,38355,39151,39333,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43838-43840,43857-43858,43860,43905-43907,43969,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338,44389,44391,44426,44460,44530,44540,44601
-/trunk/reactos/include/reactos/winsock/rnr20lib.h:44354-45543
+/trunk/reactos/include/reactos/winsock/rnr20lib.h:44354-45543,48010-48040
Propchange: branches/reactos-yarotows/include/reactos/winsock/wsmobile.h
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Wed Jul 14 20:28:06 2010
@@ -1,2 +1,2 @@
/branches/ros-amd64-bringup/reactos/include/reactos/winsock/wsmobile.h:34711-34712,34743,34780-34782,34812,34839,34842,34908-34909,34917,34965,35323-35324,35347-35348,35361,35436,35509,35515,35588,35683,35739,35746,35762,35771,35777,35789,35805,35823,35827,35902,35904-35906,35942,35947-35949,35952-35953,35966,36013,36172,36360,36388-36389,36445,36502-36503,36505,36570,36614,36899,36930,36936,36992,37323,37434,37472,37475,37536,37820-37821,37868-37869,37873,37990-37991,38013-38014,38148-38151,38264-38265,38268,38355,39151,39333,39345,39639,40122-40123,40125,40128,40155,40247,40324,40753,40928,40986-40987,40989,40991,40993,40995-40996,41000-41001,41027-41030,41044-41045,41047-41050,41052,41082-41086,41097-41098,41101,41449,41479,41484-41485,41499,41531,41536,41540,41546-41547,41549,43080,43426,43454,43506,43566,43574,43598,43600-43602,43604-43605,43677,43682,43757,43775,43838-43840,43857-43858,43860,43905-43907,43969,44002,44037,44039-44040,44044-44045,44065,44095,44123,44144,44205,44238,44294,44338,44389,44391,44426,44460,44530,44540,44601
-/trunk/reactos/include/reactos/winsock/wsmobile.h:44354-45543
+/trunk/reactos/include/reactos/winsock/wsmobile.h:44354-45543,48010-48040
Modified: branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c
URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
==============================================================================
--- branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1]
(original)
+++ branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] Wed
Jul 14 20:28:06 2010
@@ -491,89 +491,6 @@
}
-/*
- * @implemented
- */
-HANDLE
-APIENTRY
-NtUserCreateCursorIconHandle(PICONINFO IconInfo OPTIONAL, BOOL Indirect)
-{
- PCURICON_OBJECT CurIcon;
- PSURFACE psurfBmp;
- NTSTATUS Status;
- HANDLE Ret;
- DECLARE_RETURN(HANDLE);
-
- DPRINT("Enter NtUserCreateCursorIconHandle\n");
- UserEnterExclusive();
-
- if (!(CurIcon = IntCreateCurIconHandle()))
- {
- SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY);
- RETURN((HANDLE)0);
- }
-
- Ret = CurIcon->Self;
-
- if (IconInfo)
- {
- Status = MmCopyFromCaller(&CurIcon->IconInfo, IconInfo,
sizeof(ICONINFO));
- if (NT_SUCCESS(Status))
- {
- /* Copy bitmaps and size info */
- if (Indirect)
- {
- /* Convert bitmaps to unowned objects, so that they can be shared between
processes */
- CurIcon->IconInfo.hbmMask =
BITMAP_CopyBitmap(CurIcon->IconInfo.hbmMask);
- GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmMask, NULL);
- if(CurIcon->IconInfo.hbmColor)
- {
- CurIcon->IconInfo.hbmColor = BITMAP_CopyBitmap(CurIcon->IconInfo.hbmColor);
- GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmColor, NULL);
- }
- }
- if (CurIcon->IconInfo.hbmColor &&
- (psurfBmp = SURFACE_LockSurface(CurIcon->IconInfo.hbmColor)))
- {
- CurIcon->Size.cx = psurfBmp->SurfObj.sizlBitmap.cx;
- CurIcon->Size.cy = psurfBmp->SurfObj.sizlBitmap.cy;
- SURFACE_UnlockSurface(psurfBmp);
- GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmColor, NULL);
- }
- if (CurIcon->IconInfo.hbmMask &&
- (psurfBmp = SURFACE_LockSurface(CurIcon->IconInfo.hbmMask)))
- {
- if(!CurIcon->IconInfo.hbmColor)
- {
- CurIcon->Size.cx = psurfBmp->SurfObj.sizlBitmap.cx;
- CurIcon->Size.cy = psurfBmp->SurfObj.sizlBitmap.cy/2;
- }
- SURFACE_UnlockSurface(psurfBmp);
- GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmMask, NULL);
- }
-
- /* Calculate icon hotspot */
- if (CurIcon->IconInfo.fIcon == TRUE)
- {
- CurIcon->IconInfo.xHotspot = CurIcon->Size.cx >> 1;
- CurIcon->IconInfo.yHotspot = CurIcon->Size.cy >> 1;
- }
- }
- else
- {
- SetLastNtError(Status);
- /* FIXME - Don't exit here */
- }
- }
-
- UserDereferenceObject(CurIcon);
- RETURN(Ret);
-
-CLEANUP:
- DPRINT("Leave NtUserCreateCursorIconHandle, ret=%i\n",_ret_);
- UserLeave();
- END_CLEANUP;
-}
/*
* @implemented
@@ -1057,11 +974,13 @@
}
/* Delete old bitmaps */
- if (CurIcon->IconInfo.hbmColor != IconInfo.hbmColor)
+ if ((CurIcon->IconInfo.hbmColor)
+ && (CurIcon->IconInfo.hbmColor != IconInfo.hbmColor))
{
GreDeleteObject(CurIcon->IconInfo.hbmColor);
}
- if (CurIcon->IconInfo.hbmMask != IconInfo.hbmMask)
+ if ((CurIcon->IconInfo.hbmMask)
+ && CurIcon->IconInfo.hbmMask != IconInfo.hbmMask)
{
GreDeleteObject(CurIcon->IconInfo.hbmMask);
}
@@ -1253,6 +1172,15 @@
}
done:
+ if(Ret)
+ {
+ /* This icon is shared now */
+ GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmMask, NULL);
+ if(CurIcon->IconInfo.hbmColor)
+ {
+ GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmColor, NULL);
+ }
+ }
UserDereferenceObject(CurIcon);
RETURN(Ret);