mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 16:02:56 +00:00
window parent handle -> pointer adaptions
svn path=/trunk/; revision=17698
This commit is contained in:
parent
a1c7e10fc8
commit
a2c34e3c28
4 changed files with 20 additions and 17 deletions
|
@ -1,6 +1,11 @@
|
||||||
#ifndef _WIN32K_USERFUNCS_H
|
#ifndef _WIN32K_USERFUNCS_H
|
||||||
#define _WIN32K_USERFUNCS_H
|
#define _WIN32K_USERFUNCS_H
|
||||||
|
|
||||||
|
//currently unused
|
||||||
|
#define ASSERT_REFS(obj)
|
||||||
|
|
||||||
|
#define UserReferenceWindowObjectCo(o) IntReferenceWindowObject(o)
|
||||||
|
#define UserDereferenceWindowObjectCo(o) IntReleaseWindowObject(o)
|
||||||
|
|
||||||
extern PUSER_HANDLE_TABLE gHandleTable;
|
extern PUSER_HANDLE_TABLE gHandleTable;
|
||||||
|
|
||||||
|
|
|
@ -405,20 +405,18 @@ IntInvalidateWindows(PWINDOW_OBJECT Window, HRGN hRgn, ULONG Flags)
|
||||||
BOOL FASTCALL
|
BOOL FASTCALL
|
||||||
IntIsWindowDrawable(PWINDOW_OBJECT Window)
|
IntIsWindowDrawable(PWINDOW_OBJECT Window)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT Old, Wnd = Window;
|
PWINDOW_OBJECT Wnd = Window;
|
||||||
|
|
||||||
IntReferenceWindowObject(Wnd);
|
|
||||||
do
|
do
|
||||||
{
|
{
|
||||||
if (!(Wnd->Style & WS_VISIBLE) ||
|
if (!(Wnd->Style & WS_VISIBLE) ||
|
||||||
((Wnd->Style & WS_MINIMIZE) && (Wnd != Window)))
|
((Wnd->Style & WS_MINIMIZE) && (Wnd != Window)))
|
||||||
{
|
{
|
||||||
IntReleaseWindowObject(Wnd);
|
|
||||||
return FALSE;
|
return FALSE;
|
||||||
}
|
}
|
||||||
Old = Wnd;
|
|
||||||
Wnd = IntGetParentObject(Wnd);
|
Wnd = Wnd->Parent;
|
||||||
IntReleaseWindowObject(Old);
|
|
||||||
} while(Wnd);
|
} while(Wnd);
|
||||||
|
|
||||||
return TRUE;
|
return TRUE;
|
||||||
|
|
|
@ -77,7 +77,7 @@ VIS_ComputeVisibleRegion(
|
||||||
*/
|
*/
|
||||||
|
|
||||||
PreviousWindow = Window;
|
PreviousWindow = Window;
|
||||||
CurrentWindow = IntGetParentObject(Window);
|
CurrentWindow = Window->Parent;
|
||||||
while (CurrentWindow)
|
while (CurrentWindow)
|
||||||
{
|
{
|
||||||
if (!(CurrentWindow->Style & WS_VISIBLE))
|
if (!(CurrentWindow->Style & WS_VISIBLE))
|
||||||
|
@ -113,8 +113,7 @@ VIS_ComputeVisibleRegion(
|
||||||
}
|
}
|
||||||
|
|
||||||
PreviousWindow = CurrentWindow;
|
PreviousWindow = CurrentWindow;
|
||||||
CurrentWindow = IntGetParentObject(CurrentWindow);
|
CurrentWindow = CurrentWindow->Parent;
|
||||||
IntReleaseWindowObject(PreviousWindow);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (ClipChildren)
|
if (ClipChildren)
|
||||||
|
@ -159,19 +158,23 @@ co_VIS_WindowLayoutChanged(
|
||||||
HRGN Temp;
|
HRGN Temp;
|
||||||
PWINDOW_OBJECT Parent;
|
PWINDOW_OBJECT Parent;
|
||||||
|
|
||||||
|
ASSERT_REFS(Window);
|
||||||
|
|
||||||
Temp = NtGdiCreateRectRgn(0, 0, 0, 0);
|
Temp = NtGdiCreateRectRgn(0, 0, 0, 0);
|
||||||
NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY);
|
NtGdiCombineRgn(Temp, NewlyExposed, NULL, RGN_COPY);
|
||||||
|
|
||||||
Parent = IntGetParentObject(Window);
|
Parent = Window->Parent;
|
||||||
if(Parent)
|
if(Parent)
|
||||||
{
|
{
|
||||||
NtGdiOffsetRgn(Temp,
|
NtGdiOffsetRgn(Temp,
|
||||||
Window->WindowRect.left - Parent->ClientRect.left,
|
Window->WindowRect.left - Parent->ClientRect.left,
|
||||||
Window->WindowRect.top - Parent->ClientRect.top);
|
Window->WindowRect.top - Parent->ClientRect.top);
|
||||||
|
|
||||||
|
UserReferenceWindowObjectCo(Parent);
|
||||||
co_UserRedrawWindow(Parent, NULL, Temp,
|
co_UserRedrawWindow(Parent, NULL, Temp,
|
||||||
RDW_FRAME | RDW_ERASE | RDW_INVALIDATE |
|
RDW_FRAME | RDW_ERASE | RDW_INVALIDATE |
|
||||||
RDW_ALLCHILDREN);
|
RDW_ALLCHILDREN);
|
||||||
IntReleaseWindowObject(Parent);
|
UserDereferenceWindowObjectCo(Parent);
|
||||||
}
|
}
|
||||||
NtGdiDeleteObject(Temp);
|
NtGdiDeleteObject(Temp);
|
||||||
}
|
}
|
||||||
|
|
|
@ -278,7 +278,7 @@ DceUpdateVisRgn(DCE *Dce, PWINDOW_OBJECT Window, ULONG Flags)
|
||||||
{
|
{
|
||||||
PWINDOW_OBJECT Parent;
|
PWINDOW_OBJECT Parent;
|
||||||
|
|
||||||
Parent = IntGetParentObject(Window);
|
Parent = Window->Parent;
|
||||||
if(!Parent)
|
if(!Parent)
|
||||||
{
|
{
|
||||||
hRgnVisible = NULL;
|
hRgnVisible = NULL;
|
||||||
|
@ -430,7 +430,7 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
Flags = (Flags & ~DCX_CLIPCHILDREN) | DCX_CACHE;
|
Flags = (Flags & ~DCX_CLIPCHILDREN) | DCX_CACHE;
|
||||||
}
|
}
|
||||||
|
|
||||||
Parent = (Window ? IntGetParentObject(Window) : NULL);
|
Parent = (Window ? Window->Parent : NULL);
|
||||||
|
|
||||||
if (NULL == Window || !(Window->Style & WS_CHILD) || NULL == Parent)
|
if (NULL == Window || !(Window->Style & WS_CHILD) || NULL == Parent)
|
||||||
{
|
{
|
||||||
|
@ -450,9 +450,6 @@ UserGetDCEx(PWINDOW_OBJECT Window OPTIONAL, HANDLE ClipRegion, ULONG Flags)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if(Parent)
|
|
||||||
IntReleaseWindowObject(Parent);
|
|
||||||
|
|
||||||
DcxFlags = Flags & DCX_CACHECOMPAREMASK;
|
DcxFlags = Flags & DCX_CACHECOMPAREMASK;
|
||||||
|
|
||||||
if (Flags & DCX_CACHE)
|
if (Flags & DCX_CACHE)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue