|
|
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 ] | |
|
| |