mirror of
https://github.com/fltk/fltk.git
synced 2026-06-06 08:32:07 +08:00
Fixed crash on Mac OS when Fl::focus() called before show().
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@8577 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
This commit is contained in:
+4
-1
@@ -847,7 +847,10 @@ void Fl::focus(Fl_Widget *o) {
|
||||
while (w1) { win=w1; w1=win->window(); }
|
||||
if (win) {
|
||||
#ifdef __APPLE__
|
||||
if (fl_xfocus != win) Fl_X::i(win)->set_key_window();
|
||||
if (fl_xfocus != win) {
|
||||
Fl_X *x = Fl_X::i(win);
|
||||
if (x) x->set_key_window();
|
||||
}
|
||||
#endif
|
||||
fl_xfocus = win;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user