FLTK logo

[master] 5c5132f - Fix when building with SDK 10.15 and running with 11.0 Big Sur

FLTK matrix user chat room
(using Element browser app)   FLTK gitter user chat room   GitHub FLTK Project   FLTK News RSS Feed  
  FLTK Apps      FLTK Library      Forums      Links     Login 
 All Forums  |  Back to fltk.commit  ]
 
Previous Message ]Next Message ]

[master] 5c5132f - Fix when building with SDK 10.15 and running with 11.0 Big Sur "ManoloFLTK" Sep 19, 2020  
 
commit 5c5132f68119cfd289e27e7bd20a0bd34c5a0ca2
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Sat Sep 19 21:59:09 2020 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Sat Sep 19 21:59:25 2020 +0200

    Fix when building with SDK 10.15 and running with 11.0 Big Sur
    
    When FLTK runs under macOS "Big Sur", the OS appears as 11.0
    if FLTK was built with SDK 11.0 and as 10.16 it it was built with
    SDK 10.15.

 src/Fl_cocoa.mm | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index 8c7b4ae..260525b 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -2183,7 +2183,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
 }
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
 - (void)create_aux_bitmap:(CGContextRef)gc retina:(BOOL)r {
-  if (!gc || fl_mac_os_version >= 110000) {
+  if (!gc || fl_mac_os_version >= 101600) {
     // bitmap context-related functions (e.g., CGBitmapContextGetBytesPerRow) can't be used here with macOS 11.0 "Big Sur"
     static CGColorSpaceRef cspace = CGColorSpaceCreateDeviceRGB();
     int W = [self frame].size.width, H = [self frame].size.height;
@@ -2258,7 +2258,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
   if (window->damage()) d->Fl_Window_Driver::flush();
 #if MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_14
   if (destination) { // can be NULL with gl_start/gl_finish
-    if (fl_mac_os_version < 110000 && CGBitmapContextGetBytesPerRow(aux_bitmap) == CGBitmapContextGetBytesPerRow(destination)) {
+    if (fl_mac_os_version < 101600 && CGBitmapContextGetBytesPerRow(aux_bitmap) == CGBitmapContextGetBytesPerRow(destination)) {
       memcpy(CGBitmapContextGetData(destination), CGBitmapContextGetData(aux_bitmap),
              CGBitmapContextGetHeight(aux_bitmap) * CGBitmapContextGetBytesPerRow(aux_bitmap));
     } else {
Direct Link to Message ]
 
     
Previous Message ]Next Message ]
 
 

Comments are owned by the poster. All other content is copyright 1998-2024 by Bill Spitzak and others. This project is hosted by The FLTK Team. Please report site problems to 'erco@seriss.com'.