Skip to content

Commit

Permalink
[macOS] Fix driver crash when enabling per-pixel transparency on M1 m…
Browse files Browse the repository at this point in the history
…acs.
  • Loading branch information
bruvzg committed Nov 30, 2021
1 parent c4f7ba4 commit f72cc71
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions platform/osx/os_osx.mm
Original file line number Diff line number Diff line change
Expand Up @@ -2909,11 +2909,12 @@ static int get_screen_index(NSScreen *screen) {
layered_window = false;
}
[context update];
NSRect frame = [window_object frame];

if (!is_no_window_mode_enabled()) {
[window_object setFrame:NSMakeRect(frame.origin.x, frame.origin.y, 1, 1) display:YES];
[window_object setFrame:frame display:YES];
// Force resize window frame to update OpenGL context.
NSRect frameRect = [window_object frame];
[window_object setFrame:NSMakeRect(frameRect.origin.x, frameRect.origin.y, frameRect.size.width + 1, frameRect.size.height) display:NO];
[window_object setFrame:frameRect display:YES];
}
}
}
Expand Down

0 comments on commit f72cc71

Please sign in to comment.