From 6ec8ebc4f83fa2c143bff54e66672226cdf7d85c Mon Sep 17 00:00:00 2001 From: Manolo Gouy Date: Tue, 22 Mar 2016 17:47:44 +0000 Subject: Rewrite Fl_Window::show() and Fl_Menu_Window::show() under the driver model. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3-porting@11400 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_cocoa.mm | 21 +++++++-------------- 1 file changed, 7 insertions(+), 14 deletions(-) (limited to 'src/Fl_cocoa.mm') diff --git a/src/Fl_cocoa.mm b/src/Fl_cocoa.mm index b6bd51f6a..7982b4ccc 100644 --- a/src/Fl_cocoa.mm +++ b/src/Fl_cocoa.mm @@ -3145,21 +3145,14 @@ void Fl_Cocoa_Window_Driver::label(const char *name, const char *mininame) { /* * make a window visible */ -void Fl_Window::show() { - image(Fl::scheme_bg_); - if (Fl::scheme_bg_) { - labeltype(FL_NORMAL_LABEL); - align(FL_ALIGN_CENTER | FL_ALIGN_INSIDE | FL_ALIGN_CLIP); - } else { - labeltype(FL_NO_LABEL); - } - Fl_Tooltip::exit(this); +void Fl_Cocoa_Window_Driver::show() { Fl_X *top = NULL; - if (parent()) top = top_window()->i; - if (!shown() && (!parent() || (top && ![top->xid isMiniaturized]))) { - Fl_X::make(this); + if (pWindow->parent()) top = Fl_X::i(pWindow->top_window()); + if (!pWindow->shown() && (!pWindow->parent() || (top && ![top->xid isMiniaturized]))) { + Fl_X::make(pWindow); } else { - if ( !parent() ) { + if ( !pWindow->parent() ) { + Fl_X *i = Fl_X::i(pWindow); if ([i->xid isMiniaturized]) { i->w->redraw(); [i->xid deminiaturize:nil]; @@ -3168,7 +3161,7 @@ void Fl_Window::show() { [i->xid makeKeyAndOrderFront:nil]; } } - else set_visible(); + else pWindow->set_visible(); } } -- cgit v1.2.3