Explorar el Código

* GetKeyEventFromQueueWait waits always till it gets an event

git-svn-id: trunk@9203 -
florian hace 18 años
padre
commit
b7cce59ac7
Se han modificado 1 ficheros con 4 adiciones y 1 borrados
  1. 4 1
      rtl/win/keyboard.pp

+ 4 - 1
rtl/win/keyboard.pp

@@ -122,7 +122,10 @@ begin
       exit;
     end;
   WaitForSingleObject (newKeyEvent, dword(INFINITE));
-  getKeyEventFromQueueWait := getKeyEventFromQueue (t, false);
+  { force that we read a keyevent }
+  while not(getKeyEventFromQueue (t, false)) do
+    Sleep(0);
+  getKeyEventFromQueueWait:=true;
 end;
 
 { translate win32 shift-state to keyboard shift state }