diff options
| author | Manolo Gouy <Manolo> | 2018-10-28 14:20:44 +0000 |
|---|---|---|
| committer | Manolo Gouy <Manolo> | 2018-10-28 14:20:44 +0000 |
| commit | d666a6f234465e913248b5f02fe05862d468ae92 (patch) | |
| tree | 311ebbec932d9793f8a9af771f56ed4796514a44 /src | |
| parent | 50f90a69707e034909651d39a7c7103e0d20a583 (diff) | |
MacOS Mojave 10.14 support: fix creation of several OpenGL windows.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.4@13086 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src')
| -rw-r--r-- | src/Fl_cocoa.mm | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index bd8f25715..98fa750c0 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -2196,16 +2196,9 @@ static CGContextRef prepare_bitmap_for_layer(int w, int h ) { if (!Fl::use_high_res_GL() && fl_mac_os_version < 101401) [self layer].contentsScale = 1.; Fl_Window *window = [(FLWindow*)[self window] getFl_Window]; Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(window); - through_drawRect = YES; - window->clear_damage(FL_DAMAGE_ALL); - window->as_gl_window()->flush(); - window->clear_damage(); - through_drawRect = NO; - if (fl_mac_os_version < 101401) { - if (window->parent()) window->redraw(); // useful during resize of GL subwindow - } if (d->wait_for_expose_value) { // 1st drawing of GL window + [self did_view_resolution_change]; NSRect r = [[self window] frame]; r.size.width -= 1; [[self window] setFrame:r display:NO]; // very dirty but works. Should find something better. @@ -2213,6 +2206,14 @@ static CGContextRef prepare_bitmap_for_layer(int w, int h ) { [[self window] setFrame:r display:YES]; d->wait_for_expose_value = 0; } + through_drawRect = YES; + window->clear_damage(FL_DAMAGE_ALL); + window->as_gl_window()->flush(); + window->clear_damage(); + through_drawRect = NO; + if (fl_mac_os_version < 101401) { + if (window->parent()) window->redraw(); // useful during resize of GL subwindow + } fl_unlock_function(); } -(void)viewFrameDidChange { ; } |
