mirror of
https://github.com/paleotronic/microm8-gui.git
synced 2025-02-05 14:33:37 +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
|
begin
|
||||||
// if we have deactivated because of a click on the main window
|
// if we have deactivated because of a click on the main window
|
||||||
// then sort it...
|
// then sort it...
|
||||||
lastFocusLostTime:=Now();
|
|
||||||
|
|
||||||
if MillisecondsBetween(Now(), lastShowTime) < 1000 then
|
if MillisecondsBetween(Now(), lastShowTime) < 1000 then
|
||||||
exit;
|
exit;
|
||||||
|
|
||||||
RepaintWindow;
|
RepaintWindow;
|
||||||
if GetTitleOfActiveWindow <> 'microM8' then
|
if GetTitleOfActiveWindow <> 'microM8' then
|
||||||
HideM8;
|
HideM8
|
||||||
|
else
|
||||||
|
begin
|
||||||
|
lastFocusLostTime:=Now();
|
||||||
|
StatusBar1.SimpleText:='focus';
|
||||||
|
SimpleGet( baseUrl + '/api/control/mouse/buttonstate/1' );
|
||||||
|
end;
|
||||||
//StatusBar1.SimpleText := GetTitleOfActiveWindow;
|
//StatusBar1.SimpleText := GetTitleOfActiveWindow;
|
||||||
//Memo1.Lines.Add('app is deactivating');
|
//Memo1.Lines.Add('app is deactivating');
|
||||||
end;
|
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
|
begin
|
||||||
lastFocusLostTime:=Now();
|
lastFocusLostTime:=Now();
|
||||||
StatusBar1.SimpleText:='focus';
|
StatusBar1.SimpleText:='focus';
|
||||||
|
// send fake mouse button state change
|
||||||
|
SimpleGet( baseUrl + '/api/control/mouse/buttonstate/1' );
|
||||||
end;
|
end;
|
||||||
//StatusBar1.SimpleText := GetTitleOfActiveWindow;
|
//StatusBar1.SimpleText := GetTitleOfActiveWindow;
|
||||||
//Memo1.Lines.Add('app is deactivating');
|
//Memo1.Lines.Add('app is deactivating');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user