Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use NSWindow API for changing fullscreen mode #478

Merged
merged 2 commits into from Feb 28, 2020
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
8 changes: 4 additions & 4 deletions platforms/iOS/vm/OSX/sqSqueakOSXMetalView.m
Expand Up @@ -48,7 +48,7 @@

extern SqueakOSXAppDelegate *gDelegateApp;
extern struct VirtualMachine* interpreterProxy;
extern int getFullScreenFlag();
extern sqInt getFullScreenFlag();

static sqSqueakOSXMetalView *mainMetalView;

Expand Down Expand Up @@ -231,7 +231,7 @@ - (void) drawThelayers {

if (!firstDrawCompleted) {
firstDrawCompleted = YES;
if (getFullScreenFlag() == 0) {
if (!getFullScreenFlag()) {
[self.window makeKeyAndOrderFront: self];
}
}
Expand Down Expand Up @@ -876,13 +876,13 @@ - (BOOL)ignoreModifierKeysWhileDragging {
#pragma mark Fullscreen

- (void) ioSetFullScreen: (sqInt) fullScreen {
if (getFullScreenFlag() == (fullScreen == 1))
if (getFullScreenFlag() == fullScreen)
return; // not changing fullscreen mode

self.fullScreenInProgress = YES;
[self.window toggleFullScreen:self];

if (getFullScreenFlag() && (fullScreen == 0)) {
if (getFullScreenFlag() && !fullScreen) {
if ([self.window isKeyWindow] == NO) {
[self.window makeKeyAndOrderFront: self];
}
Expand Down