FLTK logo

[fltk/fltk] FLTK 1.3.6+ doesn't notify window movement on macOS (Issue #288)

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.issues  ]
 
Previous Message ]New Message | Reply ]Next Message ]

[fltk/fltk] FLTK 1.3.6+ doesn't notify window movement on macOS (Issue #288) "Pierre Ossman (Work account)" Nov 03, 2021  
 

More fallout from 46235ff. An FLTK application no longer gets calls to Fl_Window::resize() when a window is moved around on macOS.

This bug has been identified on master already and fixed in 3bb3429, so it just needs a back port. Something like:

[ossman@ossman]$ git diff src/Fl_cocoa.mm | cat
diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm
index be07b09fb..ae2958861 100644
--- a/src/Fl_cocoa.mm
+++ b/src/Fl_cocoa.mm
@@ -1438,7 +1440,7 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
     main_screen_height = CGDisplayBounds(CGMainDisplayID()).size.height;
     int X, Y;
     CocoatoFLTK(window, X, Y);
-    window->Fl_Widget::resize(X, Y, window->w(), window->h());
+    if (window->x() != X || window->y() != Y) window->position(X, Y);
     update_e_xy_and_e_xy_root(nsw);
     // at least since MacOS 10.9: OS moves subwindows contained in a moved window
     // setSubwindowFrame is no longer necessary.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or unsubscribe.
Triage notifications on the go with GitHub Mobile for iOS or Android.

Direct Link to Message ]
 
     
Previous Message ]New Message | Reply ]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'.