Browse Source

Amiga-likes: better FV system integration.
* focus/unfocus event support
* use Keyboard.WaitForSystemEvent() instead of waiting for a fixed time.
this allows very snappy event response times (you can really feel this
while typing/editing for example) together with blinking cursor support
this really enhances the IDE experience on Amiga-likes.

git-svn-id: trunk@29337 -

Károly Balogh 10 years ago
parent
commit
3a5f11ab2f
2 changed files with 11 additions and 2 deletions
  1. 9 1
      packages/fv/src/amismsg.inc
  2. 2 1
      packages/fv/src/drivers.pas

+ 9 - 1
packages/fv/src/amismsg.inc

@@ -102,6 +102,14 @@ begin
          LastYSize:=height;
          LastYSize:=height;
          PollSystemEvent:=true;
          PollSystemEvent:=true;
        end;
        end;
+     end else if Video.HasActiveWindow then begin
+       SystemEvent.typ:=SysSetFocus;
+       PutSystemEvent(SystemEvent);
+       PollSystemEvent:=true;
+     end else if Video.HasInactiveWindow then begin
+       SystemEvent.typ:=SysReleaseFocus;
+       PutSystemEvent(SystemEvent);
+       PollSystemEvent:=true;
      end;
      end;
-    end;
+   end;
 end;
 end;

+ 2 - 1
packages/fv/src/drivers.pas

@@ -825,7 +825,8 @@ end;
 {$IFDEF OS_AMIGA}
 {$IFDEF OS_AMIGA}
   begin
   begin
     { AmigaOS Delay() wait's argument in 1/50 seconds }
     { AmigaOS Delay() wait's argument in 1/50 seconds }
-    DOSDelay(2);
+    { DOSDelay(2); // the old solution... }
+    Keyboard.WaitForSystemEvent(150);
   end;
   end;
 {$ENDIF OS_AMIGA}
 {$ENDIF OS_AMIGA}