Mac OS: allow calling Fl_Gl_Window::pixel_w() before the window is shown.

git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10936 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
Manolo Gouy
2015-11-30 12:46:42 +00:00
parent 792cebf92b
commit d74f373552
+1 -1
View File
@@ -2734,7 +2734,7 @@ static FLTextInputContext* fltextinputcontext_instance = nil;
// For Fl_Gl_Window on retina display, returns 2, otherwise 1
int Fl_X::resolution_scaling_factor(Fl_Window* win)
{
return (fl_mac_os_version >= 100700 && win->as_gl_window() && Fl::use_high_res_GL() && win->i->mapped_to_retina()) ? 2 : 1;
return (fl_mac_os_version >= 100700 && win->as_gl_window() && Fl::use_high_res_GL() && win->i && win->i->mapped_to_retina()) ? 2 : 1;
}