mirror of
https://github.com/paleotronic/microm8-gui.git
synced 2024-11-25 17:42:21 +00:00
on click send fake left button down event to trick macos
This commit is contained in:
parent
5f0737c8d1
commit
38dcdd2b87
@ -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.
2
main.pas
2
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');
|
||||
|
Loading…
Reference in New Issue
Block a user