mirror of
https://github.com/reactos/reactos.git
synced 2025-02-24 01:15:09 +00:00
Fix ownership of driver-created palettes
svn path=/trunk/; revision=6804
This commit is contained in:
parent
0b8af550d1
commit
1d9998a97f
2 changed files with 13 additions and 4 deletions
|
@ -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: palette.c,v 1.18 2003/09/25 14:32:55 fireball Exp $
|
||||
/* $Id: palette.c,v 1.19 2003/11/26 22:24:04 gvg Exp $
|
||||
*
|
||||
* COPYRIGHT: See COPYING in the top level directory
|
||||
* PROJECT: ReactOS kernel
|
||||
|
@ -46,7 +46,15 @@ EngCreatePalette(ULONG Mode,
|
|||
ULONG Green,
|
||||
ULONG Blue)
|
||||
{
|
||||
return PALETTE_AllocPalette(Mode, NumColors, Colors, Red, Green, Blue);
|
||||
HPALETTE Palette;
|
||||
|
||||
Palette = PALETTE_AllocPalette(Mode, NumColors, Colors, Red, Green, Blue);
|
||||
if (NULL != Palette)
|
||||
{
|
||||
GDIOBJ_SetOwnership(Palette, NULL);
|
||||
}
|
||||
|
||||
return Palette;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -55,6 +63,8 @@ EngCreatePalette(ULONG Mode,
|
|||
BOOL STDCALL
|
||||
EngDeletePalette(IN HPALETTE Palette)
|
||||
{
|
||||
GDIOBJ_SetOwnership(Palette, PsGetCurrentProcess());
|
||||
|
||||
return PALETTE_FreePalette(Palette);
|
||||
}
|
||||
|
||||
|
|
|
@ -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: dc.c,v 1.102 2003/11/26 21:48:35 gvg Exp $
|
||||
/* $Id: dc.c,v 1.103 2003/11/26 22:24:04 gvg Exp $
|
||||
*
|
||||
* DC.C - Device context functions
|
||||
*
|
||||
|
@ -617,7 +617,6 @@ IntCreatePrimarySurface()
|
|||
DPRINT("Adjusting GDIInfo.ulLogPixelsY\n");
|
||||
PrimarySurface.GDIInfo.ulLogPixelsY = 96;
|
||||
}
|
||||
GDIOBJ_SetOwnership(PrimarySurface.DevInfo.hpalDefault, NULL);
|
||||
|
||||
DPRINT("calling completePDev\n");
|
||||
|
||||
|
|
Loading…
Reference in a new issue