mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-08-20 05:09:05 +02:00
cocoa: processing system notifcations of the fullscreen changes
git-svn-id: trunk@57624 -
This commit is contained in:
parent
1519d4d14f
commit
dbdd55fa0f
@ -427,6 +427,10 @@ type
|
|||||||
procedure windowDidResignKey(notification: NSNotification); message 'windowDidResignKey:';
|
procedure windowDidResignKey(notification: NSNotification); message 'windowDidResignKey:';
|
||||||
procedure windowDidResize(notification: NSNotification); message 'windowDidResize:';
|
procedure windowDidResize(notification: NSNotification); message 'windowDidResize:';
|
||||||
procedure windowDidMove(notification: NSNotification); message 'windowDidMove:';
|
procedure windowDidMove(notification: NSNotification); message 'windowDidMove:';
|
||||||
|
// fullscreen notifications are only reported for 10.7 fullscreen
|
||||||
|
procedure windowWillEnterFullScreen(notification: NSNotification); message 'windowWillEnterFullScreen:';
|
||||||
|
procedure windowDidEnterFullScreen(notification: NSNotification); message 'windowDidEnterFullScreen:';
|
||||||
|
procedure windowDidExitFullScreen(notification: NSNotification); message 'windowDidExitFullScreen:';
|
||||||
public
|
public
|
||||||
callback: IWindowCallback;
|
callback: IWindowCallback;
|
||||||
LCLForm: TCustomForm;
|
LCLForm: TCustomForm;
|
||||||
@ -1895,6 +1899,25 @@ begin
|
|||||||
callback.Move;
|
callback.Move;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
procedure TCocoaWindow.windowWillEnterFullScreen(notification: NSNotification);
|
||||||
|
begin
|
||||||
|
if not isInFullScreen then isInFullScreen := true;
|
||||||
|
// setting fullscreen flag, prior to the "Fullscreen" has actually been enabled.
|
||||||
|
// MacOS does 10.7 fullscreen switch with an animation (that's about 1 second long)
|
||||||
|
// if during that animation there's another call toggleFullScreen() is made
|
||||||
|
// then macOS produces an output "not in fullscreen state" and ignores the call.
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCocoaWindow.windowDidEnterFullScreen(notification: NSNotification);
|
||||||
|
begin
|
||||||
|
if not isInFullScreen then isInFullScreen := true;
|
||||||
|
end;
|
||||||
|
|
||||||
|
procedure TCocoaWindow.windowDidExitFullScreen(notification: NSNotification);
|
||||||
|
begin
|
||||||
|
if isInFullScreen then isInFullScreen := false;
|
||||||
|
end;
|
||||||
|
|
||||||
procedure TCocoaWindow.dealloc;
|
procedure TCocoaWindow.dealloc;
|
||||||
begin
|
begin
|
||||||
if (fieldEditor <> nil) then
|
if (fieldEditor <> nil) then
|
||||||
|
Loading…
Reference in New Issue
Block a user