X-Git-Url: http://www.lcore.org/git/lcore.git/blobdiff_plain/4e23b915756617cac9c6c413c14106d066085d74..refs/heads/delphi2010:/lmessages.pas

diff --git a/lmessages.pas b/lmessages.pas
index 3aafdca..a7bd01e 100755
--- a/lmessages.pas
+++ b/lmessages.pas
@@ -99,7 +99,7 @@ procedure init;
 
 implementation
 uses
-  baseunix,unix,lcore,unixutil;//,safewriteln;
+  baseunix,unix,lcore,unixutil,ltimevalstuff,sockets;//,safewriteln;
 {$i unixstuff.inc}
 
 type
@@ -135,7 +135,7 @@ var
   //than crash after over four billion
   //windows have been made ;)
   nextwindowhandle : qword = $100000000;
-{$i ltimevalstuff.inc}
+
 
 //findthreaddata should only be called while holding the structurelock
 function findthreaddata(threadid : integer) : tthreaddata;
@@ -409,11 +409,11 @@ begin
       //we have to get the window procedure while the structurelock
       //is still held as the window could be destroyed from another thread
       //otherwise.
-      if window <> nil then begin
+      if window <> nil then begin
         windowproc := window.windowproc;
-      end else begin
-        windowproc := nil;
-      end;
+      end else begin
+        windowproc := nil;
+      end;
     finally
       structurelock.release;
     end;
@@ -494,7 +494,7 @@ end;
 
 function PeekMessage(var lpMsg: TMsg; hWnd: HWND; wMsgFilterMin, wMsgFilterMax, wRemoveMsg: UINT): WINBOOL;
 begin
-  result := getmessageinternal(lpmsg,hwnd,wmsgfiltermin,wmsgfiltermax,PM_REMOVE,true);
+  result := getmessageinternal(lpmsg,hwnd,wmsgfiltermin,wmsgfiltermax,wRemoveMsg,true);
 end;
 
 function SetEvent(hEvent:THevent):WINBOOL;