@@ -636,7 +636,7 @@ -(void) enterFullScreenWindowMode
636
636
/* HACK? For some reason, we need to disable the chrome. If we don't, the fullscreen window
637
637
will be created with space left over for it. Are we creating a fullscreen window in the wrong way? */
638
638
[dpy->win setStyleMask: [dpy->win styleMask ] & ~NSWindowStyleMaskTitled];
639
- [[ dpy->win contentView ] enterFullScreenMode: [dpy->win screen ] withOptions: dict];
639
+ [dpy->view enterFullScreenMode: [dpy->win screen ] withOptions: dict];
640
640
[dict release ];
641
641
#endif
642
642
}
@@ -692,7 +692,7 @@ -(void) exitFullScreenWindowMode
692
692
* crash. To avoid it, remove the tracking area and add it back after exiting fullscreen.
693
693
* (my theory)
694
694
*/
695
- [dpy->win orderOut: [ dpy->win contentView ] ];
695
+ [dpy->win orderOut: dpy->view ];
696
696
[self exitFullScreenModeWithOptions: nil ];
697
697
/* Restore the title bar disabled in enterFullScreenWindowMode. */
698
698
if (!(dpy_ptr->flags & ALLEGRO_FRAMELESS)) {
@@ -705,7 +705,7 @@ -(void) finishExitingFullScreenWindowMode
705
705
ALLEGRO_DISPLAY_OSX_WIN *dpy = (ALLEGRO_DISPLAY_OSX_WIN*) dpy_ptr;
706
706
707
707
[dpy->win center ];
708
- [dpy->win makeKeyAndOrderFront: [ dpy->win contentView ] ];
708
+ [dpy->win makeKeyAndOrderFront: dpy->view ];
709
709
[[self window ] makeFirstResponder: self ];
710
710
}
711
711
@@ -1583,6 +1583,7 @@ static void init_new_vsync(ALLEGRO_DISPLAY_OSX_WIN *dpy)
1583
1583
1584
1584
return ;
1585
1585
}
1586
+ dpy->view = view;
1586
1587
/* Hook up the view to its display */
1587
1588
[view setAllegroDisplay: &dpy->parent];
1588
1589
[view setOpenGLContext: dpy->ctx];
@@ -1767,7 +1768,7 @@ static void destroy_display(ALLEGRO_DISPLAY* d)
1767
1768
CGDisplayModeRelease (dpy->original_mode );
1768
1769
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
1769
1770
if (dpy->win ) {
1770
- [[ dpy->win contentView ] exitFullScreenModeWithOptions: nil ];
1771
+ [dpy->view exitFullScreenModeWithOptions: nil ];
1771
1772
}
1772
1773
#endif
1773
1774
CGDisplayRelease (dpy->display_id );
@@ -1776,7 +1777,7 @@ static void destroy_display(ALLEGRO_DISPLAY* d)
1776
1777
else if (display->flags & ALLEGRO_FULLSCREEN_WINDOW) {
1777
1778
#if MAC_OS_X_VERSION_MIN_REQUIRED >= 1050
1778
1779
if (dpy->win ) {
1779
- [[ dpy->win contentView ] exitFullScreenModeWithOptions: nil ];
1780
+ [dpy->view exitFullScreenModeWithOptions: nil ];
1780
1781
}
1781
1782
#endif
1782
1783
}
@@ -2416,7 +2417,7 @@ static bool set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff)
2416
2417
bool __block retcode = true ;
2417
2418
dispatch_sync (dispatch_get_main_queue (), ^{
2418
2419
NSWindowStyleMask mask = [win styleMask ];
2419
- ALOpenGLView *view = (ALOpenGLView *)[win contentView ] ;
2420
+ ALOpenGLView *view = (ALOpenGLView *)dpy-> view ;
2420
2421
switch (flag) {
2421
2422
case ALLEGRO_FRAMELESS:
2422
2423
if (onoff)
@@ -2457,7 +2458,7 @@ static bool set_display_flag(ALLEGRO_DISPLAY *display, int flag, bool onoff)
2457
2458
display->flags |= ALLEGRO_MAXIMIZED;
2458
2459
else
2459
2460
display->flags &= ~ALLEGRO_MAXIMIZED;
2460
- [[win contentView ] maximize ];
2461
+ [dpy->view maximize ];
2461
2462
break ;
2462
2463
case ALLEGRO_FULLSCREEN_WINDOW:
2463
2464
if (onoff) {
0 commit comments