mirror of
https://github.com/reactos/reactos.git
synced 2024-07-31 00:28:56 +00:00
- Fixed handling of WM_GETICON message.
- Don't allow destroying icons of foreign processes. svn path=/trunk/; revision=8917
This commit is contained in:
parent
a1f1c3b257
commit
d6c2152ba9
|
@ -1,4 +1,4 @@
|
|||
/* $Id: defwnd.c,v 1.124 2004/02/22 23:40:58 gvg Exp $
|
||||
/* $Id: defwnd.c,v 1.125 2004/03/29 06:38:50 navaraf Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS user32.dll
|
||||
|
@ -1384,7 +1384,7 @@ User32DefWindowProc(HWND hWnd,
|
|||
|
||||
case WM_GETICON:
|
||||
{
|
||||
INT Index = (wParam != 0) ? GCL_HICON : GCL_HICONSM;
|
||||
INT Index = (wParam == ICON_BIG) ? GCL_HICON : GCL_HICONSM;
|
||||
return (GetClassLongW(hWnd, Index));
|
||||
}
|
||||
|
||||
|
|
|
@ -16,7 +16,7 @@
|
|||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||
*/
|
||||
/* $Id: cursoricon.c,v 1.51 2004/03/15 20:21:51 navaraf Exp $ */
|
||||
/* $Id: cursoricon.c,v 1.52 2004/03/29 06:38:50 navaraf Exp $ */
|
||||
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
|
||||
|
@ -368,7 +368,12 @@ IntDestroyCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE Handle, BOOL Rem
|
|||
return FALSE;
|
||||
}
|
||||
|
||||
if(WinStaObject->SystemCursor.CurrentCursorObject == Object)
|
||||
if (Object->Process != PsGetWin32Process())
|
||||
{
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
if (WinStaObject->SystemCursor.CurrentCursorObject == Object)
|
||||
{
|
||||
/* Hide the cursor if we're destroying the current cursor */
|
||||
IntSetCursor(WinStaObject, NULL, TRUE);
|
||||
|
@ -376,17 +381,14 @@ IntDestroyCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE Handle, BOOL Rem
|
|||
|
||||
bmpMask = Object->IconInfo.hbmMask;
|
||||
bmpColor = Object->IconInfo.hbmColor;
|
||||
|
||||
|
||||
if(Object->Process && RemoveFromProcess)
|
||||
|
||||
if (Object->Process && RemoveFromProcess)
|
||||
{
|
||||
IntLockProcessCursorIcons(Object->Process);
|
||||
RemoveEntryList(&Object->ListEntry);
|
||||
IntUnLockProcessCursorIcons(Object->Process);
|
||||
}
|
||||
|
||||
ObmDereferenceObject(Object);
|
||||
|
||||
Ret = NT_SUCCESS(ObmCloseHandle(HandleTable, Handle));
|
||||
|
||||
/* delete bitmaps */
|
||||
|
@ -394,6 +396,8 @@ IntDestroyCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE Handle, BOOL Rem
|
|||
NtGdiDeleteObject(bmpMask);
|
||||
if(bmpColor)
|
||||
NtGdiDeleteObject(bmpColor);
|
||||
|
||||
/* ObmDereferenceObject(Object);*/
|
||||
|
||||
return Ret;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue