Fix problem when calling Fl_Window::fullscreen_off() in certain circumstances.
The problem was discovered in fltk.coredev "Crashing regression in MacOS code"
This commit is contained in:
parent
118c67c804
commit
5839817c51
@ -3190,6 +3190,11 @@ void Fl_Cocoa_Window_Driver::fullscreen_off(int X, int Y, int W, int H) {
|
|||||||
[nswin setStyleMask:calc_win_style(pWindow)]; //10.6
|
[nswin setStyleMask:calc_win_style(pWindow)]; //10.6
|
||||||
restore_window_title_and_icon(pWindow, icon_image);
|
restore_window_title_and_icon(pWindow, icon_image);
|
||||||
pWindow->resize(X, Y, W, H);
|
pWindow->resize(X, Y, W, H);
|
||||||
|
// at least under macOS 10.15.5-6, NSViewFrameDidChangeNotification is not sent
|
||||||
|
// if the dock is at bottom (but is sent if the dock is at left!)
|
||||||
|
NSNotification *notif = [NSNotification notificationWithName:NSViewFrameDidChangeNotification
|
||||||
|
object:[nswin contentView]];
|
||||||
|
[[FLWindowDelegate singleInstance] view_did_resize:notif];
|
||||||
} else
|
} else
|
||||||
#endif
|
#endif
|
||||||
{
|
{
|
||||||
|
Loading…
Reference in New Issue
Block a user