reactos/subsys/win32k/ntuser
diff -u -r1.79 -r1.80
--- msgqueue.c 28 Mar 2004 21:46:26 -0000 1.79
+++ msgqueue.c 31 Mar 2004 19:44:34 -0000 1.80
@@ -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: msgqueue.c,v 1.79 2004/03/28 21:46:26 weiden Exp $
+/* $Id: msgqueue.c,v 1.80 2004/03/31 19:44:34 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -248,8 +248,6 @@
USHORT Msg = Message->Msg.message;
PWINDOW_OBJECT CaptureWin, Window = NULL;
POINT Point;
- LPARAM SpareLParam;
- LRESULT Result;
if (Msg == WM_LBUTTONDOWN ||
Msg == WM_MBUTTONDOWN ||
@@ -269,11 +267,11 @@
{
if(Window->Self != IntGetFocusWindow())
{
- SpareLParam = MAKELONG(*HitTest, Msg);
if(*HitTest != (USHORT)HTTRANSPARENT)
{
- Result = IntSendMessage(Window->Self, WM_MOUSEACTIVATE, (WPARAM)NtUserGetParent(Window->Self), (LPARAM)SpareLParam);
+ LRESULT Result;
+ Result = IntSendMessage(Window->Self, WM_MOUSEACTIVATE, (WPARAM)NtUserGetParent(Window->Self), (LPARAM)MAKELONG(*HitTest, Msg));
switch (Result)
{
reactos/subsys/win32k/ntuser
diff -u -r1.206 -r1.207
--- window.c 31 Mar 2004 19:20:18 -0000 1.206
+++ window.c 31 Mar 2004 19:44:34 -0000 1.207
@@ -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: window.c,v 1.206 2004/03/31 19:20:18 gvg Exp $
+/* $Id: window.c,v 1.207 2004/03/31 19:44:34 weiden Exp $
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
@@ -2124,40 +2124,38 @@
switch (Type)
{
case GA_PARENT:
+ {
WndAncestor = IntGetParentObject(Wnd);
break;
+ }
case GA_ROOT:
+ {
+ PWINDOW_OBJECT tmp;
WndAncestor = Wnd;
Parent = NULL;
-#if 0
- while (0 != (WndAncestor->Style & WS_CHILD))
- {
- Parent = IntGetParentObject(WndAncestor);
- if (WndAncestor != Wnd)
- {
- IntReleaseWindowObject(WndAncestor);
- }
- WndAncestor = Parent;
- }
-#else
+
for(;;)
{
- if(Parent)
+ tmp = Parent;
+ if(!(Parent = IntGetParentObject(WndAncestor)))
{
- IntReleaseWindowObject(Parent);
+ break;
}
- if(!(Parent = IntGetParentObject(WndAncestor)) ||
- !IntIsDesktopWindow(WndAncestor))
+ if(IntIsDesktopWindow(Parent))
{
+ IntReleaseWindowObject(Parent);
break;
}
+ if(tmp)
+ IntReleaseWindowObject(tmp);
WndAncestor = Parent;
}
-#endif
break;
+ }
case GA_ROOTOWNER:
+ {
WndAncestor = Wnd;
IntReferenceWindowObject(WndAncestor);
for (;;)
@@ -2173,21 +2171,19 @@
WndAncestor = Parent;
}
break;
+ }
default:
+ {
IntReleaseWindowObject(Wnd);
return NULL;
+ }
}
+ hWndAncestor = (WndAncestor ? WndAncestor->Self : NULL);
IntReleaseWindowObject(Wnd);
- if(!WndAncestor)
- {
- return NULL;
- }
-
- hWndAncestor = WndAncestor->Self;
- if(WndAncestor != Wnd)
+ if(WndAncestor && (WndAncestor != Wnd))
IntReleaseWindowObject(WndAncestor);
return hWndAncestor;