FLTK logo

[master] 324fcfc - macOS: Fix scaling subwindows - cont'd #927

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] 324fcfc - macOS: Fix scaling subwindows - cont'd #927 "ManoloFLTK" 10:47 May 08  
 
commit 324fcfcb6228aeb24af8c50d548438e5f1d174b7
Author:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
AuthorDate: Wed May 8 19:43:56 2024 +0200
Commit:     ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>
CommitDate: Wed May 8 19:43:56 2024 +0200

    macOS: Fix scaling subwindows - cont'd #927

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

diff --git src/Fl_cocoa.mm src/Fl_cocoa.mm
index 4b9f403..25f57a5 100644
--- src/Fl_cocoa.mm
+++ src/Fl_cocoa.mm
@@ -1370,8 +1370,13 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
     W = window->w();
     H = window->h();
   } else if (Fl_Cocoa_Window_Driver::driver(window)->through_resize()) {
-    X = window->x();
-    Y = window->y();
+    if (window->parent()) {
+      X = window->x();
+      Y = window->y();
+    } else {
+      // Recalculate the FLTK position from the current Cocoa position
+      CocoatoFLTK(window, X, Y);
+    }
     W = window->w();
     H = window->h();
   } 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'.