Restore use of virtual Fl_Window::resize() to be notified when window moves.
A previous commit c66caf5dce
"Simpler implementation of Fl_Cocoa_Window_Driver::resize()"
made that Fl_Window::resize() was no longer called by FLTK when a
window is moved. This prevented the undocumented practice of
re-implementing the virtual function Fl_Window::resize() and use it
as a way to get a notification that a window was moved.
This commit is contained in:
parent
a0638273c8
commit
3bb3429670
@ -1216,9 +1216,7 @@ static FLWindowDelegate *flwindowdelegate_instance = nil;
|
|||||||
main_screen_height = CGDisplayBounds(CGMainDisplayID()).size.height;
|
main_screen_height = CGDisplayBounds(CGMainDisplayID()).size.height;
|
||||||
int X, Y;
|
int X, Y;
|
||||||
CocoatoFLTK(window, X, Y);
|
CocoatoFLTK(window, X, Y);
|
||||||
Fl_Cocoa_Window_Driver *d = Fl_Cocoa_Window_Driver::driver(window);
|
if (window->x() != X || window->y() != Y) window->position(X, Y);
|
||||||
d->x(X);
|
|
||||||
d->y(Y);
|
|
||||||
update_e_xy_and_e_xy_root(nsw);
|
update_e_xy_and_e_xy_root(nsw);
|
||||||
// at least since MacOS 10.9: OS moves subwindows contained in a moved window
|
// at least since MacOS 10.9: OS moves subwindows contained in a moved window
|
||||||
// setSubwindowFrame is no longer necessary.
|
// setSubwindowFrame is no longer necessary.
|
||||||
|
Loading…
Reference in New Issue
Block a user