on click send fake left button down event to trick macos

This commit is contained in:
April Ayres-Griffiths 2019-04-13 14:15:28 +10:00
parent 5f0737c8d1
commit 38dcdd2b87
5 changed files with 9 additions and 2 deletions

View File

@ -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;

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -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');