diff --git a/backup/main.pas b/backup/main.pas index 7587b83..a410a76 100644 --- a/backup/main.pas +++ b/backup/main.pas @@ -586,14 +586,19 @@ 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; RepaintWindow; if GetTitleOfActiveWindow <> 'microM8' then - HideM8; + HideM8 + else + begin + lastFocusLostTime:=Now(); + StatusBar1.SimpleText:='focus'; + SimpleGet( baseUrl + '/api/control/mouse/buttonstate/1' ); + end; //StatusBar1.SimpleText := GetTitleOfActiveWindow; //Memo1.Lines.Add('app is deactivating'); end; diff --git a/lib/x86_64-win64/main.o b/lib/x86_64-win64/main.o index af333e8..3219a73 100644 Binary files a/lib/x86_64-win64/main.o and b/lib/x86_64-win64/main.o differ diff --git a/lib/x86_64-win64/main.ppu b/lib/x86_64-win64/main.ppu index c52bc7c..eb9f47c 100644 Binary files a/lib/x86_64-win64/main.ppu and b/lib/x86_64-win64/main.ppu differ diff --git a/lib/x86_64-win64/poc.obj b/lib/x86_64-win64/poc.obj index e3070d4..317fc00 100644 Binary files a/lib/x86_64-win64/poc.obj and b/lib/x86_64-win64/poc.obj differ diff --git a/main.pas b/main.pas index 8c7eb04..0cd81bf 100644 --- a/main.pas +++ b/main.pas @@ -597,6 +597,8 @@ begin begin lastFocusLostTime:=Now(); StatusBar1.SimpleText:='focus'; + // send fake mouse button state change + SimpleGet( baseUrl + '/api/control/mouse/buttonstate/1' ); end; //StatusBar1.SimpleText := GetTitleOfActiveWindow; //Memo1.Lines.Add('app is deactivating');