[prev in list] [next in list] [prev in thread] [next in thread]
List: ros-diffs
Subject: [ros-diffs] [CVS reactos] fixed crashes that could be caused by the
From: weiden () osexperts ! com
Date: 2004-02-26 22:32:16
Message-ID: 20040226222357.47B694407 () mok ! osexperts ! com
[Download RAW message or body]
<html>
<head>
<style><!--
body {background-color:#ffffff;}
.file {border:1px solid #eeeeee;margin-top:1em;margin-bottom:1em;}
.pathname {font-family:monospace; float:right;}
.fileheader {margin-bottom:.5em;}
.diff {margin:0;}
.tasklist {padding:4px;border:1px dashed #000000;margin-top:1em;}
.tasklist ul {margin-top:0;margin-bottom:0;}
tr.alt {background-color:#eeeeee}
#added {background-color:#ddffdd;}
#addedchars {background-color:#99ff99;font-weight:bolder;}
tr.alt #added {background-color:#ccf7cc;}
#removed {background-color:#ffdddd;}
#removedchars {background-color:#ff9999;font-weight:bolder;}
tr.alt #removed {background-color:#f7cccc;}
#info {color:#888888;}
#context {background-color:#eeeeee;}
td {padding-left:.3em;padding-right:.3em;}
tr.head {border-bottom-width:1px;border-bottom-style:solid;}
tr.head td {padding:0;padding-top:.2em;}
.task {background-color:#ffff00;}
.comment {padding:4px;border:1px dashed #000000;background-color:#ffffdd}
.error {color:red;}
hr {border-width:0px;height:2px;background:black;}
--></style>
</head>
<body>
<table cellspacing="0" cellpadding="0" border="0" rules="cols">
<tr class="head"><td colspan="4">Commit in <b><tt>reactos/subsys/win32k</tt></b><span \
id="info"> on MAIN</span></td></tr> <tr><td><tt>include/<a \
href="#file1">cursoricon.h</a></tt></td><td align="right" id="added">+3</td><td \
align="right" id="removed">-1</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/cursoricon.h?rev=1.6&content-type=text/x-cvsweb-markup">1.6</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/cursoricon.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/cursoricon.h?rev=1.7&content-type=text/x-cvsweb-markup">1.7</a></td></tr>
<tr class="alt"><td><tt> /<a \
href="#file2">prop.h</a></tt></td><td align="right" id="added">+6</td><td></td><td \
nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/prop.h?rev=1.6&content-type=text/x-cvsweb-markup">1.6</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/prop.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/prop.h?rev=1.7&content-type=text/x-cvsweb-markup">1.7</a></td></tr>
<tr><td><tt> /<a \
href="#file3">window.h</a></tt></td><td align="right" id="added">+6</td><td \
align="right" id="removed">-8</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/window.h?rev=1.50&content-type=text/x-cvsweb-markup">1.50</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/window.h.diff?r1=text&tr1=1.50&r2=text&tr2=1.51&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/window.h?rev=1.51&content-type=text/x-cvsweb-markup">1.51</a></td></tr>
<tr class="alt"><td><tt> /<a \
href="#file4">winpos.h</a></tt></td><td align="right" id="added">+1</td><td \
align="right" id="removed">-1</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/winpos.h?rev=1.11&content-type=text/x-cvsweb-markup">1.11</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/winpos.h.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/winpos.h?rev=1.12&content-type=text/x-cvsweb-markup">1.12</a></td></tr>
<tr><td><tt>misc/<a href="#file5">object.c</a></tt></td><td align="right" \
id="added">+1</td><td align="right" id="removed">-4</td><td nowrap="nowrap" \
align="center"><a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/misc/object.c?rev=1.10&content-type=text/x-cvsweb-markup">1.10</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/misc/object.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/misc/object.c?rev=1.11&content-type=text/x-cvsweb-markup">1.11</a></td></tr>
<tr class="alt"><td><tt>ntuser/<a href="#file6">msgqueue.c</a></tt></td><td \
align="right" id="added">+24</td><td align="right" id="removed">-8</td><td \
nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/msgqueue.c?rev=1.72&content-type=text/x-cvsweb-markup">1.72</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/msgqueue.c.diff?r1=text&tr1=1.72&r2=text&tr2=1.73&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/msgqueue.c?rev=1.73&content-type=text/x-cvsweb-markup">1.73</a></td></tr>
<tr><td><tt> /<a \
href="#file7">vis.c</a></tt></td><td align="right" id="added">+5</td><td \
align="right" id="removed">-6</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/vis.c?rev=1.20&content-type=text/x-cvsweb-markup">1.20</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/vis.c.diff?r1=text&tr1=1.20&r2=text&tr2=1.21&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/vis.c?rev=1.21&content-type=text/x-cvsweb-markup">1.21</a></td></tr>
<tr class="alt"><td><tt> /<a \
href="#file8">window.c</a></tt></td><td align="right" id="added">+111</td><td \
align="right" id="removed">-37</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/window.c?rev=1.193&content-type=text/x-cvsweb-markup">1.193</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/window.c.diff?r1=text&tr1=1.193&r2=text&tr2=1.194&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/window.c?rev=1.194&content-type=text/x-cvsweb-markup">1.194</a></td></tr>
<tr><td><tt> /<a \
href="#file9">winpos.c</a></tt></td><td align="right" id="added">+56</td><td \
align="right" id="removed">-51</td><td nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/winpos.c?rev=1.100&content-type=text/x-cvsweb-markup">1.100</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/winpos.c.diff?r1=text&tr1=1.100&r2=text&tr2=1.101&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/winpos.c?rev=1.101&content-type=text/x-cvsweb-markup">1.101</a></td></tr>
<tr class="alt"><td><tt>objects/<a href="#file10">cursoricon.c</a></tt></td><td \
align="right" id="added">+1</td><td align="right" id="removed">-7</td><td \
nowrap="nowrap" align="center"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/cursoricon.c?rev=1.48&content-type=text/x-cvsweb-markup">1.48</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/cursoricon.c.diff?r1=text&tr1=1.48&r2=text&tr2=1.49&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/cursoricon.c?rev=1.49&content-type=text/x-cvsweb-markup">1.49</a></td></tr>
<tr><td></td><td align="right" id="added">+214</td><td align="right" \
id="removed">-123</td><td></td></tr> </table>
<small id="info">10 modified files</small><br />
<pre class="comment">
fixed crashes that could be caused by the thread cleanup routine when destroying \
windows from different threads </pre>
<hr /><a name="file1" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include">include</a><br \
/></span> <div class="fileheader"><big><b>cursoricon.h</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/cursoricon.h?rev=1.6&content-type=text/x-cvsweb-markup">1.6</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/cursoricon.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/cursoricon.h?rev=1.7&content-type=text/x-cvsweb-markup">1.7</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- cursoricon.h 24 Feb 2004 13:27:02 -0000 1.6
+++ cursoricon.h 26 Feb 2004 22:23:54 -0000 1.7
@@ -19,10 +19,12 @@
</small></pre><pre class="diff" id="context"> HCURSOR FASTCALL \
IntSetCursor(PWINSTATION_OBJECT WinStaObject, PCURICON_OBJECT NewCursor, BOOL \
ForceChange); BOOL FASTCALL IntSetupCurIconHandles(PWINSTATION_OBJECT WinStaObject);
PCURICON_OBJECT FASTCALL IntGetCurIconObject(PWINSTATION_OBJECT WinStaObject, HANDLE \
Handle); </pre><pre class="diff" id="removed">-VOID FASTCALL \
IntReleaseCurIconObject(PCURICON_OBJECT Object); </pre><pre class="diff" \
id="context"> PCURICON_OBJECT FASTCALL IntCreateCurIconHandle(PWINSTATION_OBJECT \
WinStaObject); VOID FASTCALL IntCleanupCurIcons(struct _EPROCESS *Process, \
PW32PROCESS Win32Process);
</pre><pre class="diff" id="added">+#define IntReleaseCurIconObject(CurIconObj) \
+ ObmDereferenceObject(CurIconObj)
+
</pre><pre class="diff" id="context"> #define IntLockProcessCursorIcons(W32Process) \
ExAcquireFastMutex(&W32Process->CursorIconListLock)
</pre></div>
<hr /><a name="file2" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include">include</a><br \
/></span> <div class="fileheader"><big><b>prop.h</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/prop.h?rev=1.6&content-type=text/x-cvsweb-markup">1.6</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/prop.h.diff?r1=text&tr1=1.6&r2=text&tr2=1.7&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/prop.h?rev=1.7&content-type=text/x-cvsweb-markup">1.7</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.6 -r1.7
--- prop.h 24 Feb 2004 13:27:02 -0000 1.6
+++ prop.h 26 Feb 2004 22:23:54 -0000 1.7
@@ -8,6 +8,12 @@
</small></pre><pre class="diff" id="context"> ATOM Atom;
} PROPERTY, *PPROPERTY;
</pre><pre class="diff" id="added">+BOOL FASTCALL
+IntSetProp(PWINDOW_OBJECT Wnd, ATOM Atom, HANDLE Data);
+
+PPROPERTY FASTCALL
+IntGetProp(PWINDOW_OBJECT WindowObject, ATOM Atom);
+
</pre><pre class="diff" id="context"> #define IntLockWindowProperties(Window) \
ExAcquireFastMutex(&Window->PropListLock)
</pre></div>
<hr /><a name="file3" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include">include</a><br \
/></span> <div class="fileheader"><big><b>window.h</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/window.h?rev=1.50&content-type=text/x-cvsweb-markup">1.50</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/window.h.diff?r1=text&tr1=1.50&r2=text&tr2=1.51&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/window.h?rev=1.51&content-type=text/x-cvsweb-markup">1.51</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.50 -r1.51
--- window.h 24 Feb 2004 13:27:02 -0000 1.50
+++ window.h 26 Feb 2004 22:23:54 -0000 1.51
@@ -72,9 +72,9 @@
</small></pre><pre class="diff" id="context"> struct _WINDOW_OBJECT* PrevSibling;
/* Entry in the list of thread windows. */
LIST_ENTRY ThreadListEntry;
</pre><pre class="diff" id="removed">- /* <span id="removedchars">Pointer</span> to \
the parent window. */ </pre><pre class="diff" id="added">+ /* <span \
id="addedchars">Handle</span> to the parent window. */ </pre><pre class="diff" \
id="context"> HANDLE Parent; </pre><pre class="diff" id="removed">- /* <span \
id="removedchars">Pointer</span> to the owner window. */ </pre><pre class="diff" \
id="added">+ /* <span id="addedchars">Handle</span> to the owner window. */ \
</pre><pre class="diff" id="context"> HANDLE Owner; /* DC Entries (DCE) */
PDCE Dce;
</pre><pre class="diff"><small id="info">@@ -93,6 +93,7 @@
</small></pre><pre class="diff" id="context"> PETHREAD OwnerThread;
HWND hWndLastPopup; /* handle to last active popup window (wine doesn't use \
pointer, for unk. reason)*/ PINTERNALPOS InternalPos;
</pre><pre class="diff" id="added">+ ULONG Status;
</pre><pre class="diff" id="context"> } WINDOW_OBJECT; /* PWINDOW_OBJECT already \
declared at top of file */
/* Window flags. */
</pre><pre class="diff"><small id="info">@@ -102,6 +103,9 @@
</small></pre><pre class="diff" id="context"> #define WINDOWOBJECT_NEED_INTERNALPAINT \
(0x00000008) #define WINDOWOBJECT_RESTOREMAX (0x00000020)
</pre><pre class="diff" id="added">+#define WINDOWSTATUS_DESTROYING (0x1)
+#define WINDOWSTATUS_DESTROYED (0x2)
+
</pre><pre class="diff" id="context"> #define IntIsDesktopWindow(WndObj) \
(WndObj->Parent == NULL)
</pre><pre class="diff"><small id="info">@@ -167,12 +171,6 @@
</small></pre><pre class="diff" id="context"> BOOL FASTCALL
IntIsChildWindow (HWND Parent, HWND Child);
</pre><pre class="diff" id="removed">-BOOL FASTCALL
-IntSetProp(PWINDOW_OBJECT Wnd, ATOM Atom, HANDLE Data);
-
-PPROPERTY FASTCALL
-IntGetProp(PWINDOW_OBJECT WindowObject, ATOM Atom);
-
</pre><pre class="diff" id="context"> VOID FASTCALL
IntUnlinkWindow(PWINDOW_OBJECT Wnd);
</pre></div>
<hr /><a name="file4" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include">include</a><br \
/></span> <div class="fileheader"><big><b>winpos.h</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/winpos.h?rev=1.11&content-type=text/x-cvsweb-markup">1.11</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/winpos.h.diff?r1=text&tr1=1.11&r2=text&tr2=1.12&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/include/winpos.h?rev=1.12&content-type=text/x-cvsweb-markup">1.12</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.11 -r1.12
--- winpos.h 24 Feb 2004 15:56:52 -0000 1.11
+++ winpos.h 26 Feb 2004 22:23:54 -0000 1.12
@@ -20,7 +20,7 @@
</small></pre><pre class="diff" id="context"> BOOLEAN FASTCALL
WinPosShowWindow(HWND Wnd, INT Cmd);
USHORT FASTCALL
</pre><pre class="diff" id="removed">-WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, \
BOOL Send<span id="removedchars">ProcHitTests</span>, POINT *WinPoint, </pre><pre \
class="diff" id="added">+WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, BOOL \
Send<span id="addedchars">HitTestMessage</span>, POINT *WinPoint, </pre><pre \
class="diff" id="context"> PWINDOW_OBJECT* Window); VOID FASTCALL \
WinPosActivateOtherWindow(PWINDOW_OBJECT Window);
</pre></div>
<hr /><a name="file5" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/misc">misc</a><br \
/></span> <div class="fileheader"><big><b>object.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/misc/object.c?rev=1.10&content-type=text/x-cvsweb-markup">1.10</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/misc/object.c.diff?r1=text&tr1=1.10&r2=text&tr2=1.11&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/misc/object.c?rev=1.11&content-type=text/x-cvsweb-markup">1.11</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.10 -r1.11
--- object.c 24 Feb 2004 13:27:03 -0000 1.10
+++ object.c 26 Feb 2004 22:23:54 -0000 1.11
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: object.c,v 1.10 2004/02/24 13:27:03 \
weiden Exp $ </pre><pre class="diff" id="added">+/* $Id: object.c,v 1.11 2004/02/26 \
22:23:54 weiden Exp $ </pre><pre class="diff" id="context"> *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
</pre><pre class="diff"><small id="info">@@ -31,7 +31,6 @@
</small></pre><pre class="diff" id="context">
#include <ddk/ntddk.h>
#include <include/object.h>
</pre><pre class="diff" id="removed">-#include <include/window.h>
</pre><pre class="diff" id="context">
#define NDEBUG
#include <debug.h>
</pre><pre class="diff"><small id="info">@@ -289,7 +288,6 @@
</small></pre><pre class="diff" id="context"> ObjectHeader = \
BODY_TO_HEADER(ObjectBody);
ObjectHeader->RefCount--;
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="context"> ObmpPerformRetentionChecks(ObjectHeader);
}
</pre><pre class="diff"><small id="info">@@ -312,7 +310,6 @@
</small></pre><pre class="diff" id="context"> {
return STATUS_INVALID_PARAMETER;
}
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="context"> ObjectHeader->RefCount++;
return STATUS_SUCCESS;
</pre></div>
<hr /><a name="file6" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser">ntuser</a><br \
/></span> <div class="fileheader"><big><b>msgqueue.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/msgqueue.c?rev=1.72&content-type=text/x-cvsweb-markup">1.72</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/msgqueue.c.diff?r1=text&tr1=1.72&r2=text&tr2=1.73&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/msgqueue.c?rev=1.73&content-type=text/x-cvsweb-markup">1.73</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.72 -r1.73
--- msgqueue.c 24 Feb 2004 15:56:52 -0000 1.72
+++ msgqueue.c 26 Feb 2004 22:23:54 -0000 1.73
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: msgqueue.c,v 1.72 2004/02/24 15:56:52 \
weiden Exp $ </pre><pre class="diff" id="added">+/* $Id: msgqueue.c,v 1.73 2004/02/26 \
22:23:54 weiden Exp $ </pre><pre class="diff" id="context"> *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
</pre><pre class="diff"><small id="info">@@ -255,7 +255,12 @@
</small></pre><pre class="diff" id="context"> Msg == WM_RBUTTONDOWN ||
Msg == WM_XBUTTONDOWN)
{
</pre><pre class="diff" id="removed">- USHORT Hit = \
WinPosWindowFromPoint(ScopeWin, FALSE, &Message->Msg.pt, &Window); \
</pre><pre class="diff" id="added">+ *HitTest = WinPosWindowFromPoint(ScopeWin, \
!FromGlobalQueue, &Message->Msg.pt, &Window); + if(Window && \
FromGlobalQueue && (PsGetWin32Thread()->MessageQueue == \
Window->MessageQueue)) + {
+ *HitTest = IntSendMessage(Window->Self, WM_NCHITTEST, 0,
+ MAKELONG(Message->Msg.pt.x, \
Message->Msg.pt.y)); + }
</pre><pre class="diff" id="context"> /*
**Make sure that we have a window that is not already in focus
*/
</pre><pre class="diff"><small id="info">@@ -263,9 +268,9 @@
</small></pre><pre class="diff" id="context"> {
if(Window->Self != IntGetFocusWindow())
{
</pre><pre class="diff" id="removed">- SpareLParam = MAKELONG(<span \
id="removedchars">Hi</span>t, Msg); </pre><pre class="diff" id="added">+ \
SpareLParam = MAKELONG(<span id="addedchars">*HitTes</span>t, Msg); </pre><pre \
class="diff" id="context"> </pre><pre class="diff" id="removed">- \
if(<span id="removedchars">Hi</span>t != (USHORT)HTTRANSPARENT) </pre><pre \
class="diff" id="added">+ if(<span id="addedchars">*HitTes</span>t != \
(USHORT)HTTRANSPARENT) </pre><pre class="diff" id="context"> {
Result = IntSendMessage(Window->Self, WM_MOUSEACTIVATE, \
(WPARAM)NtUserGetParent(Window->Self), (LPARAM)SpareLParam);
</pre><pre class="diff"><small id="info">@@ -297,7 +302,6 @@
</small></pre><pre class="diff" id="context"> return(FALSE);
}
}
</pre><pre class="diff" id="removed">- IntReleaseWindowObject(Window);
</pre><pre class="diff" id="context"> }
}
</pre><pre class="diff"><small id="info">@@ -309,20 +313,32 @@
</small></pre><pre class="diff" id="context"> if(Msg == WM_MOUSEWHEEL)
{
*HitTest = HTCLIENT;
</pre><pre class="diff" id="added">+ if(Window)
+ IntReleaseWindowObject(Window);
</pre><pre class="diff" id="context"> Window = \
IntGetWindowObject(IntGetFocusWindow()); }
else
{
</pre><pre class="diff" id="removed">- *HitTest = \
WinPosWindowFromPoint(ScopeWin, FALSE, &Message->Msg.pt, &Window); \
</pre><pre class="diff" id="context"> if(!Window) {
</pre><pre class="diff" id="removed">- /* change the cursor on desktop \
background */
- IntLoadDefaultCursors(TRUE);
</pre><pre class="diff" id="added">+ *HitTest = \
WinPosWindowFromPoint(ScopeWin, !FromGlobalQueue, &Message->Msg.pt, \
&Window); + if(Window && FromGlobalQueue && \
(PsGetWin32Thread()->MessageQueue == Window->MessageQueue)) + {
+ *HitTest = IntSendMessage(Window->Self, WM_NCHITTEST, 0,
+ MAKELONG(Message->Msg.pt.x, \
Message->Msg.pt.y)); + }
+ if(!Window)
+ {
+ /* change the cursor on desktop background */
+ IntLoadDefaultCursors(TRUE);
+ }
</pre><pre class="diff" id="context"> }
}
}
else
{
</pre><pre class="diff" id="added">+ if(Window)
+ IntReleaseWindowObject(Window);
</pre><pre class="diff" id="context"> Window = IntGetWindowObject(CaptureWin);
*HitTest = HTCLIENT;
}
</pre></div>
<hr /><a name="file7" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser">ntuser</a><br \
/></span> <div class="fileheader"><big><b>vis.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/vis.c?rev=1.20&content-type=text/x-cvsweb-markup">1.20</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/vis.c.diff?r1=text&tr1=1.20&r2=text&tr2=1.21&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/vis.c?rev=1.21&content-type=text/x-cvsweb-markup">1.21</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.20 -r1.21
--- vis.c 24 Feb 2004 01:30:57 -0000 1.20
+++ vis.c 26 Feb 2004 22:23:54 -0000 1.21
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*
</pre><pre class="diff" id="removed">- * $Id: vis.c,v 1.20 2004/02/24 01:30:57 weiden \
Exp $ </pre><pre class="diff" id="added">+ * $Id: vis.c,v 1.21 2004/02/26 22:23:54 \
weiden Exp $ </pre><pre class="diff" id="context"> *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
</pre><pre class="diff"><small id="info">@@ -144,12 +144,11 @@
</small></pre><pre class="diff" id="context"> NtGdiOffsetRgn(Temp,
Window->WindowRect.left - Parent->ClientRect.left,
Window->WindowRect.top - Parent->ClientRect.top);
</pre><pre class="diff" id="removed">- }
- IntRedrawWindow(Parent, NULL, Temp,
- RDW_FRAME | RDW_ERASE | RDW_INVALIDATE |
- RDW_ALLCHILDREN);
- if(Parent)
</pre><pre class="diff" id="added">+ IntRedrawWindow(Parent, NULL, Temp,
+ RDW_FRAME | RDW_ERASE | RDW_INVALIDATE |
+ RDW_ALLCHILDREN);
</pre><pre class="diff" id="context"> IntReleaseWindowObject(Parent);
</pre><pre class="diff" id="added">+ }
</pre><pre class="diff" id="context"> NtGdiDeleteObject(Temp);
}
</pre></div>
<hr /><a name="file8" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser">ntuser</a><br \
/></span> <div class="fileheader"><big><b>window.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/window.c?rev=1.193&content-type=text/x-cvsweb-markup">1.193</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/window.c.diff?r1=text&tr1=1.193&r2=text&tr2=1.194&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/window.c?rev=1.194&content-type=text/x-cvsweb-markup">1.194</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.193 -r1.194
--- window.c 24 Feb 2004 15:56:52 -0000 1.193
+++ window.c 26 Feb 2004 22:23:54 -0000 1.194
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: window.c,v 1.193 2004/02/24 15:56:52 \
weiden Exp $ </pre><pre class="diff" id="added">+/* $Id: window.c,v 1.194 2004/02/26 \
22:23:54 weiden Exp $ </pre><pre class="diff" id="context"> *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
</pre><pre class="diff"><small id="info">@@ -289,11 +289,25 @@
</small></pre><pre class="diff" id="context"> HWND *ChildHandle;
PWINDOW_OBJECT Child;
PMENU_OBJECT Menu;
</pre><pre class="diff" id="added">+ BOOL BelongsToThreadData;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- if (! IntWndBelongsToThread(Window, \
ThreadData))
- {
- return 0;
- }
</pre><pre class="diff" id="added">+ ASSERT(Window);
+
+ IntLockThreadWindows(Window->OwnerThread->Win32Thread);
+ if(Window->Status & WINDOWSTATUS_DESTROYING)
+ {
+ IntUnLockThreadWindows(Window->OwnerThread->Win32Thread);
+ DPRINT("Tried to call IntDestroyWindow() twice\n");
+ return 0;
+ }
+ Window->Status |= WINDOWSTATUS_DESTROYING;
+ /* remove the window already at this point from the thread window list so we
+ don't get into trouble when destroying the thread windows while we're still
+ in IntDestroyWindow() */
+ RemoveEntryList(&Window->ThreadListEntry);
+ IntUnLockThreadWindows(Window->OwnerThread->Win32Thread);
+
+ BelongsToThreadData = IntWndBelongsToThread(Window, ThreadData);
</pre><pre class="diff" id="context">
if(SendMessages)
{
</pre><pre class="diff"><small id="info">@@ -309,15 +323,13 @@
</small></pre><pre class="diff" id="context"> {
if ((Child = IntGetWindowObject(*ChildHandle)))
{
</pre><pre class="diff" id="removed">- if(IntWndBelongsToThread(Child, \
ThreadData))
- {
- IntDestroyWindow(Child, ProcessData, ThreadData, SendMessages);
- }
- else
</pre><pre class="diff" id="added">+ if(!IntWndBelongsToThread(Child, \
ThreadData)) </pre><pre class="diff" id="context"> {
</pre><pre class="diff" id="added">+ /* send WM_DESTROY messages to \
windows not belonging to the same thread */ </pre><pre class="diff" id="context"> \
IntSendDestroyMsg(Child->Self); </pre><pre class="diff" id="removed">- \
IntDestroyWindow(Child, ProcessData, Child->OwnerThread->Win32Thread, FALSE); \
</pre><pre class="diff" id="context"> } </pre><pre class="diff" \
id="added">+ else + IntDestroyWindow(Child, ProcessData, \
ThreadData, SendMessages); </pre><pre class="diff" id="context"> \
IntReleaseWindowObject(Child); }
}
</pre><pre class="diff"><small id="info">@@ -329,7 +341,7 @@
</small></pre><pre class="diff" id="context"> /*
* Clear the update region to make sure no WM_PAINT messages will be
* generated for this window while processing the WM_NCDESTROY.
</pre><pre class="diff" id="removed">- */
</pre><pre class="diff" id="added">+ */<span id="addedchars"> </span>
</pre><pre class="diff" id="context"> IntRedrawWindow(Window, NULL, 0,
RDW_VALIDATE | RDW_NOFRAME | RDW_NOERASE |
RDW_NOINTERNALPAINT | RDW_NOCHILDREN);
</pre><pre class="diff"><small id="info">@@ -337,7 +349,8 @@
</small></pre><pre class="diff" id="context"> /*
* Send the WM_NCDESTROY to the window being destroyed.
*/
</pre><pre class="diff" id="removed">- IntSendMessage(Window->Self, \
WM_NCDESTROY, 0, 0); </pre><pre class="diff" id="added">+ \
if(BelongsToThreadData) + IntSendMessage(Window->Self, WM_NCDESTROY, 0, 0);
</pre><pre class="diff" id="context"> }
/* reset shell window handles */
</pre><pre class="diff"><small id="info">@@ -349,7 +362,7 @@
</small></pre><pre class="diff" id="context"> if (Window->Self == \
ProcessData->WindowStation->ShellListView) \
ProcessData->WindowStation->ShellListView = NULL; }
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> /* Unregister hot keys */
UnregisterWindowHotKeys (Window);
</pre><pre class="diff"><small id="info">@@ -389,17 +402,22 @@
</small></pre><pre class="diff" id="context"> #endif
IntUnlinkWindow(Window);
</pre><pre class="diff" id="removed">-
- IntLockThreadWindows(ThreadData);
- RemoveEntryList(&Window->ThreadListEntry);
- IntUnLockThreadWindows(ThreadData);
</pre><pre class="diff" id="added">+
+ IntReferenceWindowObject(Window);
+ ObmCloseHandle(ProcessData->WindowStation->HandleTable, Window->Self);
</pre><pre class="diff" id="context">
IntDestroyScrollBar(Window, SB_VERT);
IntDestroyScrollBar(Window, SB_HORZ);
</pre><pre class="diff" id="added">+ \
IntLockThreadWindows(Window->OwnerThread->Win32Thread); + Window->Status |= \
WINDOWSTATUS_DESTROYED; + /* don't remove the WINDOWSTATUS_DESTROYING bit */
+ IntUnLockThreadWindows(Window->OwnerThread->Win32Thread);
+
</pre><pre class="diff" id="context"> ObmDereferenceObject(Window->Class);
Window->Class = NULL;
</pre><pre class="diff" id="removed">- \
ObmCloseHandle(ProcessData->WindowStation->HandleTable, Window->Self); \
</pre><pre class="diff" id="added">+ + IntReleaseWindowObject(Window);
</pre><pre class="diff" id="context">
return 0;
}
</pre><pre class="diff"><small id="info">@@ -475,30 +493,57 @@
</small></pre><pre class="diff" id="context"> VOID FASTCALL
DestroyThreadWindows(struct _ETHREAD *Thread)
{
</pre><pre class="diff" id="removed">- PLIST_ENTRY <span \
id="removedchars">LastHead</span>; </pre><pre class="diff" id="added">+ PLIST_ENTRY \
<span id="addedchars">Current</span>; </pre><pre class="diff" id="context"> \
PW32PROCESS Win32Process; PW32THREAD Win32Thread;
PWINDOW_OBJECT Window;
</pre><pre class="diff" id="added">+ HWND *List, *phWnd;
+ ULONG Cnt = 0;
</pre><pre class="diff" id="context">
Win32Thread = Thread->Win32Thread;
Win32Process = Thread->ThreadsProcess->Win32Process;
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> IntLockThreadWindows(Win32Thread);
</pre><pre class="diff" id="removed">- LastHead = NULL;
- while (Win32Thread->WindowListHead.Flink != \
&(Win32Thread->WindowListHead) &&
- Win32Thread->WindowListHead.Flink != LastHead)
</pre><pre class="diff" id="added">+ Current = Win32Thread->WindowListHead.Flink;
+ while (Current != &(Win32Thread->WindowListHead))
+ {
+ Cnt++;
+ Current = Current->Flink;
+ }
+
+ if(Cnt > 0)
+ {
+ List = ExAllocatePool(PagedPool, (Cnt + 1) * sizeof(HANDLE));
+ if(!List)
</pre><pre class="diff" id="context"> {
</pre><pre class="diff" id="removed">- LastHead = \
Win32Thread->WindowListHead.Flink;
- Window = CONTAINING_RECORD(Win32Thread->WindowListHead.Flink, \
WINDOW_OBJECT, ThreadListEntry); </pre><pre class="diff" id="added">+ \
DPRINT("Not enough memory to allocate window handle list\n"); </pre><pre class="diff" \
id="context"> IntUnLockThreadWindows(Win32Thread); </pre><pre class="diff" \
id="removed">- WinPosShowWindow(Window->Self, SW_HIDE);
- IntDestroyWindow(Window, Win32Process, Win32Thread, FALSE);
- IntLockThreadWindows(Win32Thread);
</pre><pre class="diff" id="added">+ return;
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- if (Win32Thread->WindowListHead.Flink == \
LastHead) </pre><pre class="diff" id="added">+ phWnd = List;
+ Current = Win32Thread->WindowListHead.Flink;
+ while (Current != &(Win32Thread->WindowListHead))
+ {
+ Window = CONTAINING_RECORD(Current, WINDOW_OBJECT, ThreadListEntry);
+ *phWnd = Window->Self;
+ phWnd++;
+ Current = Current->Flink;
+ }
+ IntUnLockThreadWindows(Win32Thread);
+ *phWnd = NULL;
+
+ for(phWnd = List; *phWnd; phWnd++)
</pre><pre class="diff" id="context"> {
</pre><pre class="diff" id="removed">- /* Window at head of list was not \
removed, should never happen, infinite loop */
- KEBUGCHECK(0);
</pre><pre class="diff" id="added">+ if((Window = IntGetWindowObject(*phWnd)))
+ {
+ IntDestroyWindow(Window, Win32Process, Win32Thread, FALSE);
+ IntReleaseWindowObject(Window);
+ }
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="added">+ ExFreePool(List);
+ return;
+ }
+
</pre><pre class="diff" id="context"> IntUnLockThreadWindows(Win32Thread);
}
</pre><pre class="diff"><small id="info">@@ -655,11 +700,23 @@
</small></pre><pre class="diff" id="context"> BOOL FASTCALL
IntIsChildWindow(HWND Parent, HWND Child)
{
</pre><pre class="diff" id="removed">- PWINDOW_OBJECT BaseWindow = \
IntGetWindowObject(Child);
- PWINDOW_OBJECT Window = BaseWindow;
</pre><pre class="diff" id="added">+ PWINDOW_OBJECT Window;
+ PWINDOW_OBJECT BaseWindow;
</pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- while (Window != NULL && \
Window->Style & WS_CHILD) </pre><pre class="diff" id="added">+ \
if(!(BaseWindow = IntGetWindowObject(Child))) </pre><pre class="diff" id="context"> \
{ </pre><pre class="diff" id="added">+ return FALSE;
+ }
+
+ Window = BaseWindow;
+ while (Window)
+ {
+ if(!(Window->Style & WS_CHILD))
+ {
+ if(Window != BaseWindow)
+ IntReleaseWindowObject(Window);
+ break;
+ }
</pre><pre class="diff" id="context"> if (Window->Self == Parent)
{
if(Window != BaseWindow)
</pre><pre class="diff"><small id="info">@@ -1512,8 +1569,15 @@
</small></pre><pre class="diff" id="context"> /* link the window into the \
parent's child list */ if ((dwStyle & (WS_CHILD|WS_MAXIMIZE)) == WS_CHILD)
{
</pre><pre class="diff" id="added">+ PWINDOW_OBJECT PrevSibling;
+ IntLockRelatives(ParentWindow);
+ if((PrevSibling = ParentWindow->LastChild))
+ IntReferenceWindowObject(PrevSibling);
+ IntUnLockRelatives(ParentWindow);
</pre><pre class="diff" id="context"> /* link window as bottom sibling */
</pre><pre class="diff" id="removed">- IntLinkWindow(WindowObject, \
ParentWindow, P<span id="removedchars">arentWindow->LastChild</span> /*prev \
sibling*/); </pre><pre class="diff" id="added">+ IntLinkWindow(WindowObject, \
ParentWindow, P<span id="addedchars">revSibling</span> /*prev sibling*/); + \
if(PrevSibling) + IntReleaseWindowObject(PrevSibling);
</pre><pre class="diff" id="context"> }
else
{
</pre><pre class="diff"><small id="info">@@ -1711,7 +1775,7 @@
</small></pre><pre class="diff" id="context"> {
return TRUE;
}
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> /* Recursively destroy owned windows */
if (! isChild)
{
</pre><pre class="diff"><small id="info">@@ -1734,11 +1798,19 @@
</small></pre><pre class="diff" id="context"> {
continue;
}
</pre><pre class="diff" id="added">+ if(Child->Self == Wnd)
+ {
+ IntReleaseWindowObject(Child);
+ continue;
+ }
+ IntLockRelatives(Child);
</pre><pre class="diff" id="context"> if (Child->Parent != Window->Self)
{
</pre><pre class="diff" id="added">+ IntUnLockRelatives(Child);
</pre><pre class="diff" id="context"> IntReleaseWindowObject(Child);
continue;
}
</pre><pre class="diff" id="added">+ IntUnLockRelatives(Child);
</pre><pre class="diff" id="context"> if (IntWndBelongsToThread(Child, \
PsGetWin32Thread())) {
IntReleaseWindowObject(Child);
</pre><pre class="diff"><small id="info">@@ -1746,10 +1818,12 @@
</small></pre><pre class="diff" id="context"> GotOne = TRUE;
continue;
}
</pre><pre class="diff" id="added">+ IntLockRelatives(Child);
</pre><pre class="diff" id="context"> if (Child->Owner != NULL)
{
Child->Owner = NULL;
}
</pre><pre class="diff" id="added">+ IntUnLockRelatives(Child);
</pre><pre class="diff" id="context"> IntReleaseWindowObject(Child);
}
ExFreePool(Children);
</pre><pre class="diff"><small id="info">@@ -1760,7 +1834,7 @@
</small></pre><pre class="diff" id="context"> }
}
}
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="added">+
</pre><pre class="diff" id="context"> if (!IntIsWindow(Wnd))
{
return TRUE;
</pre></div>
<hr /><a name="file9" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser">ntuser</a><br \
/></span> <div class="fileheader"><big><b>winpos.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/winpos.c?rev=1.100&content-type=text/x-cvsweb-markup">1.100</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/winpos.c.diff?r1=text&tr1=1.100&r2=text&tr2=1.101&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/ntuser/winpos.c?rev=1.101&content-type=text/x-cvsweb-markup">1.101</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.100 -r1.101
--- winpos.c 24 Feb 2004 15:56:53 -0000 1.100
+++ winpos.c 26 Feb 2004 22:23:55 -0000 1.101
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: winpos.c,v 1.100 2004/02/24 15:56:53 \
weiden Exp $ </pre><pre class="diff" id="added">+/* $Id: winpos.c,v 1.101 2004/02/26 \
22:23:55 weiden Exp $ </pre><pre class="diff" id="context"> *
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
</pre><pre class="diff"><small id="info">@@ -82,7 +82,7 @@
</small></pre><pre class="diff" id="context"> {
PWINDOW_OBJECT WindowObject;
</pre><pre class="diff" id="removed">- WindowObject = IntGetWindowObject(hWnd);
</pre><pre class="diff" id="added">+ WindowObject = IntGetWindowObject((hWnd ? hWnd \
: IntGetDesktopWindow())); </pre><pre class="diff" id="context"> if (WindowObject \
== NULL) {
Point->x = Point->y = 0;
</pre><pre class="diff"><small id="info">@@ -102,8 +102,20 @@
</small></pre><pre class="diff" id="context"> POINT pt;
NTSTATUS Status;
</pre><pre class="diff" id="added">+ if(!Point)
+ {
+ SetLastWin32Error(ERROR_INVALID_PARAMETER);
+ return FALSE;
+ }
+
</pre><pre class="diff" id="context"> Ret = IntGetClientOrigin(hWnd, &pt);
</pre><pre class="diff" id="added">+ if(!Ret)
+ {
+ SetLastWin32Error(ERROR_INVALID_WINDOW_HANDLE);
+ return FALSE;
+ }
+
</pre><pre class="diff" id="context"> Status = MmCopyToCaller(Point, &pt, \
sizeof(POINT)); if(!NT_SUCCESS(Status))
{
</pre><pre class="diff"><small id="info">@@ -122,45 +134,48 @@
</small></pre><pre class="diff" id="context"> VOID FASTCALL
WinPosActivateOtherWindow(PWINDOW_OBJECT Window)
{
</pre><pre class="diff" id="removed">- PWINDOW_OBJECT Child, Wnd = Window;
- HWND *List, *phWnd;
-
</pre><pre class="diff" id="added">+ PWINDOW_OBJECT Wnd, Old;
+
</pre><pre class="diff" id="context"> if (!Window || IntIsDesktopWindow(Window))
{
IntSetFocusMessageQueue(NULL);
return;
}
</pre><pre class="diff" id="removed">-
</pre><pre class="diff" id="added">+ Wnd = Window;
</pre><pre class="diff" id="context"> for(;;)
{
</pre><pre class="diff" id="added">+ HWND *List, *phWnd;
+
+ Old = Wnd;
</pre><pre class="diff" id="context"> Wnd = IntGetParentObject(Wnd);
</pre><pre class="diff" id="removed">- if(!Wnd)
</pre><pre class="diff" id="added">+ if(Old != Window)
</pre><pre class="diff" id="context"> {
</pre><pre class="diff" id="removed">- IntSetFocusMessageQueue(NULL);
- return;
</pre><pre class="diff" id="added">+ IntReleaseWindowObject(Old);
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- if(IntIsDesktopWindow(Wnd))
</pre><pre class="diff" id="added">+ if(!Wnd)
</pre><pre class="diff" id="context"> {
</pre><pre class="diff" id="removed">- IntReleaseWindowObject(Wnd);
</pre><pre class="diff" id="context"> IntSetFocusMessageQueue(NULL);
return;
}
</pre><pre class="diff" id="removed">- if((List = IntWinListChildren(Window)))
</pre><pre class="diff" id="added">+
+ if((List = IntWinListChildren(Wnd)))
</pre><pre class="diff" id="context"> {
</pre><pre class="diff" id="removed">- for(phWnd = List; *phWnd; <span \
id="removedchars">++phWnd</span>) </pre><pre class="diff" id="added">+ for(phWnd \
= List; *phWnd; <span id="addedchars">phWnd++</span>) </pre><pre class="diff" \
id="context"> { </pre><pre class="diff" id="removed">- if(*phWnd == \
Window->Self) </pre><pre class="diff" id="added">+ PWINDOW_OBJECT Child;
+
+ if((*phWnd) == Window->Self)
</pre><pre class="diff" id="context"> {
continue;
}
</pre><pre class="diff" id="removed">- Child = IntGetWindowObject(*phWnd);
- if(Child)
</pre><pre class="diff" id="added">+ if((Child = IntGetWindowObject(*phWnd)))
</pre><pre class="diff" id="context"> {
if(IntSetForegroundWindow(Child))
{
</pre><pre class="diff" id="removed">- IntReleaseWindowObject(Child);
</pre><pre class="diff" id="context"> ExFreePool(List);
</pre><pre class="diff" id="added">+ IntReleaseWindowObject(Wnd);
+ IntReleaseWindowObject(Child);
</pre><pre class="diff" id="context"> return;
}
IntReleaseWindowObject(Child);
</pre><pre class="diff"><small id="info">@@ -169,6 +184,7 @@
</small></pre><pre class="diff" id="context"> ExFreePool(List);
}
}
</pre><pre class="diff" id="added">+ IntReleaseWindowObject(Wnd);
</pre><pre class="diff" id="context"> }
VOID STATIC FASTCALL
</pre><pre class="diff"><small id="info">@@ -1276,8 +1292,8 @@
</small></pre><pre class="diff" id="context"> return(WasVisible);
}
</pre><pre class="diff" id="removed">-BOOL STATIC FASTCALL
-WinPosSearchChildren(PWINDOW_OBJECT ScopeWin, BOOL SendProcHitTests, POINT *Point,
</pre><pre class="diff" id="added">+VOID STATIC FASTCALL
+WinPosSearchChildren(PWINDOW_OBJECT ScopeWin, BOOL SendHitTestMessage, POINT *Point,
</pre><pre class="diff" id="context"> PWINDOW_OBJECT* Window, USHORT *HitTest)
{
PWINDOW_OBJECT Current;
</pre><pre class="diff"><small id="info">@@ -1293,29 +1309,27 @@
</small></pre><pre class="diff" id="context"> }
if (Current->Style & WS_VISIBLE &&
</pre><pre class="diff" id="removed">- ((!(Current->Style & \
WS_DISABLED)) ||
- (Current->Style & (WS_CHILD | WS_POPUP)) != WS_CHILD) &&
- (Point->x >= Current->WindowRect.left &&
</pre><pre class="diff" id="added">+ (!(Current->Style & WS_DISABLED) || \
(Current->Style & (WS_CHILD | WS_POPUP)) != WS_CHILD) && + \
(Point->x >= Current->WindowRect.left && </pre><pre class="diff" \
id="context"> Point->x < Current->WindowRect.right && \
Point->y >= Current->WindowRect.top && Point->y < \
Current->WindowRect.bottom)) /* FIXME - check if Point is in window region */
{
</pre><pre class="diff" id="removed">- if(*Window)
- {
- IntReleaseWindowObject(*Window);
- }
- *Window = Current;
</pre><pre class="diff" id="added">+ if(*Window)
+ {
+ IntReleaseWindowObject(*Window);
+ }
+ *Window = Current;
</pre><pre class="diff" id="context">
if(Current->Style & WS_DISABLED)
{
*HitTest = HTERROR;
</pre><pre class="diff" id="removed">- ExFreePool(List);
- return TRUE;
</pre><pre class="diff" id="added">+ ExFreePool(List);
+ return;
</pre><pre class="diff" id="context"> }
</pre><pre class="diff" id="removed">- if((SendProcHitTests &&
- (Current->OwnerThread->ThreadsProcess == PsGetCurrentProcess())) \
|| </pre><pre class="diff" id="added">+ if(SendHitTestMessage &&
</pre><pre class="diff" id="context"> (Current->MessageQueue == \
PsGetWin32Thread()->MessageQueue)) {
*HitTest = IntSendMessage(Current->Self, WM_NCHITTEST, 0,
</pre><pre class="diff"><small id="info">@@ -1335,31 +1349,22 @@
</small></pre><pre class="diff" id="context"> Point->y >= \
Current->ClientRect.top && Point->y < \
Current->ClientRect.bottom) {
</pre><pre class="diff" id="removed">- USHORT ChildHitTest;
- if(WinPosSearchChildren(Current, SendProcHitTests, Point, Window, \
&ChildHitTest))
- {
- *HitTest = ChildHitTest;
- ExFreePool(List);
- return TRUE;
- }
</pre><pre class="diff" id="added">+ WinPosSearchChildren(Current, \
SendHitTestMessage, Point, Window, HitTest); + ExFreePool(List);
+ return;
</pre><pre class="diff" id="context"> }
ExFreePool(List);
</pre><pre class="diff" id="removed">- return<span \
id="removedchars"> TRUE</span>; </pre><pre class="diff" id="added">+ \
return; </pre><pre class="diff" id="context"> }
IntReleaseWindowObject(Current);
}
ExFreePool(List);
}
</pre><pre class="diff" id="removed">-
- if((*Window) == NULL)
- HitTest = HTNOWHERE;
-
- return FALSE;
</pre><pre class="diff" id="context"> }
USHORT FASTCALL
</pre><pre class="diff" id="removed">-WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, \
BOOL Send<span id="removedchars">ProcHitTests</span>, POINT *WinPoint, </pre><pre \
class="diff" id="added">+WinPosWindowFromPoint(PWINDOW_OBJECT ScopeWin, BOOL \
Send<span id="addedchars">HitTestMessage</span>, POINT *WinPoint, </pre><pre \
class="diff" id="context"> PWINDOW_OBJECT* Window) {
HWND DesktopWindowHandle;
</pre><pre class="diff"><small id="info">@@ -1382,19 +1387,19 @@
</small></pre><pre class="diff" id="context">
/* Translate the point to the space of the scope window. */
DesktopWindowHandle = IntGetDesktopWindow();
</pre><pre class="diff" id="removed">- if((DesktopWindow = \
IntGetWindowObject(DesktopWindowHandle))) </pre><pre class="diff" id="added">+ \
if((DesktopWindowHandle != ScopeWin->Self) && + (DesktopWindow = \
IntGetWindowObject(DesktopWindowHandle))) </pre><pre class="diff" id="context"> {
Point.x += ScopeWin->ClientRect.left - DesktopWindow->ClientRect.left;
Point.y += ScopeWin->ClientRect.top - DesktopWindow->ClientRect.top;
IntReleaseWindowObject(DesktopWindow);
}
</pre><pre class="diff" id="removed">- if(WinPosSearchChildren(ScopeWin, \
SendProcHitTests, &Point, Window, &HitTest))
- {
- return HitTest;
- }
</pre><pre class="diff" id="added">+ HitTest = HTNOWHERE;
+
+ WinPosSearchChildren(ScopeWin, SendHitTestMessage, &Point, Window, \
&HitTest); </pre><pre class="diff" id="context">
</pre><pre class="diff" id="removed">- return HTNOWHERE;
</pre><pre class="diff" id="added">+ return ((*Window) ? HitTest : HTNOWHERE);
</pre><pre class="diff" id="context"> }
BOOL
</pre></div>
<hr /><a name="file10" /><div class="file">
<span class="pathname"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos">reactos</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys">subsys</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k">win32k</a>/<a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects">objects</a><br \
/></span> <div class="fileheader"><big><b>cursoricon.c</b></big> <small id="info"><a \
href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/cursoricon.c?rev=1.48&content-type=text/x-cvsweb-markup">1.48</a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/cursoricon.c.diff?r1=text&tr1=1.48&r2=text&tr2=1.49&f=h">-></a> \
<a href="http://cvs.reactos.com/cgi-bin/cvsweb/reactos/subsys/win32k/objects/cursoricon.c?rev=1.49&content-type=text/x-cvsweb-markup">1.49</a></small></div>
<pre class="diff"><small id="info">diff -u -r1.48 -r1.49
--- cursoricon.c 24 Feb 2004 13:27:03 -0000 1.48
+++ cursoricon.c 26 Feb 2004 22:23:55 -0000 1.49
@@ -16,7 +16,7 @@
</small></pre><pre class="diff" id="context"> * along with this program; if not, \
write to the Free Software
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
*/
</pre><pre class="diff" id="removed">-/* $Id: cursoricon.c,v 1.4<span \
id="removedchars">8 2004/02/24 13:27:03</span> weiden Exp $ */ </pre><pre \
class="diff" id="added">+/* $Id: cursoricon.c,v 1.4<span \
id="addedchars">9 2004/02/26 22:23:55</span> weiden Exp $ */ </pre><pre \
class="diff" id="context"> #undef WIN32_LEAN_AND_MEAN
</pre><pre class="diff"><small id="info">@@ -61,12 +61,6 @@
</small></pre><pre class="diff" id="context"> return Object;
}
</pre><pre class="diff" id="removed">-VOID FASTCALL
-IntReleaseCurIconObject(PCURICON_OBJECT Object)
-{
- ObmDereferenceObject(Object);
-}
-
</pre><pre class="diff" id="context"> HBITMAP FASTCALL
IntCopyBitmap(HBITMAP bmp)
{
</pre></div>
<center><small><a href="http://www.badgers-in-foil.co.uk/projects/cvsspam/" \
title="commit -> email">CVSspam</a> 0.2.8</small></center> </body></html>
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic