mirror of
https://github.com/paleotronic/microm8-gui.git
synced 2024-06-01 02:41:34 +00:00
add defocus action delay of 250ms
This commit is contained in:
parent
06a8af05fe
commit
5f0737c8d1
|
@ -586,6 +586,8 @@ procedure TGUIForm.AppDeactivate(Sender: TObject);
|
|||
begin
|
||||
// if we have deactivated because of a click on the main window
|
||||
// then sort it...
|
||||
lastFocusLostTime:=Now();
|
||||
|
||||
if MillisecondsBetween(Now(), lastShowTime) < 1000 then
|
||||
exit;
|
||||
|
||||
|
@ -2290,8 +2292,8 @@ procedure TGUIForm.CheckTimerTimer(Sender: TObject);
|
|||
begin
|
||||
if isFS then
|
||||
exit;
|
||||
//if MilliSecondsBetween(Now(), lastShowTime) < 500 then
|
||||
// exit;
|
||||
if MilliSecondsBetween(Now(), lastFocusLostTime) < 250 then
|
||||
exit;
|
||||
if WindowState = wsMinimized then
|
||||
exit;
|
||||
//if hidden then
|
||||
|
|
Binary file not shown.
Binary file not shown.
8
main.pas
8
main.pas
|
@ -586,12 +586,18 @@ procedure TGUIForm.AppDeactivate(Sender: TObject);
|
|||
begin
|
||||
// if we have deactivated because of a click on the main window
|
||||
// then sort it...
|
||||
|
||||
if MillisecondsBetween(Now(), lastShowTime) < 1000 then
|
||||
exit;
|
||||
|
||||
RepaintWindow;
|
||||
if GetTitleOfActiveWindow <> 'microM8' then
|
||||
HideM8;
|
||||
HideM8
|
||||
else
|
||||
begin
|
||||
lastFocusLostTime:=Now();
|
||||
StatusBar1.SimpleText:='focus';
|
||||
end;
|
||||
//StatusBar1.SimpleText := GetTitleOfActiveWindow;
|
||||
//Memo1.Lines.Add('app is deactivating');
|
||||
end;
|
||||
|
|
Loading…
Reference in New Issue
Block a user