diff options
| author | Matthias Melcher <fltk@matthiasm.com> | 2006-08-29 11:03:05 +0000 |
|---|---|---|
| committer | Matthias Melcher <fltk@matthiasm.com> | 2006-08-29 11:03:05 +0000 |
| commit | 7ae0ff02404e602e0929e82fb11364a4a684ee10 (patch) | |
| tree | 948388e97d98417addb4c5e1338388a7509d97fc /src/Fl.cxx | |
| parent | 00ec9da8f5cf0f37f3c64e0a45b4046f86153765 (diff) | |
Updated OSX subwindow simulation code to better add and remove from the clipping list
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@5379 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
| -rw-r--r-- | src/Fl.cxx | 52 |
1 files changed, 18 insertions, 34 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx index 922443c6d..930c95a66 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -881,23 +881,9 @@ void Fl_Window::hide() { Fl_X** pp = &Fl_X::first; for (; *pp != ip; pp = &(*pp)->next) if (!*pp) return; *pp = ip->next; - -#ifdef __APPLE_QD__ - // remove all childwindow links - for ( Fl_X *pc = Fl_X::first; pc; pc = pc->next ) - { - if ( pc->xidNext == ip ) pc->xidNext = ip->xidNext; - if ( pc->xidChildren == ip ) pc->xidChildren = ip->xidNext; - } -#elif defined(__APPLE_QUARTZ__) - // remove all childwindow links - for ( Fl_X *pc = Fl_X::first; pc; pc = pc->next ) - { - if ( pc->xidNext == ip ) pc->xidNext = ip->xidNext; - if ( pc->xidChildren == ip ) pc->xidChildren = ip->xidNext; - } -#endif // __APPLE__ - +#ifdef __APPLE__ + MacUnlinkWindow(ip); +#endif i = 0; // recursively remove any subwindows: @@ -941,11 +927,11 @@ void Fl_Window::hide() { fl_gc = 0; } #elif defined(__APPLE_QD__) - if ( ip->xid == fl_window ) + if ( ip->xid == fl_window && !parent() ) fl_window = 0; #elif defined(__APPLE_QUARTZ__) Fl_X::q_release_context(ip); - if ( ip->xid == fl_window ) + if ( ip->xid == fl_window && !parent() ) fl_window = 0; #endif @@ -960,19 +946,9 @@ void Fl_Window::hide() { } XDestroyWindow(fl_display, ip->xid); #elif defined(__APPLE_QD__) - if ( !parent() ) // don't destroy shared windows! - { - //+ RemoveTrackingHandler( dndTrackingHandler, ip->xid ); - //+ RemoveReceiveHandler( dndReceiveHandler, ip->xid ); - XDestroyWindow(fl_display, ip->xid); - } + MacDestroyWindow(this, ip->xid); #elif defined(__APPLE_QUARTZ__) - if ( !parent() ) // don't destroy shared windows! - { - //+ RemoveTrackingHandler( dndTrackingHandler, ip->xid ); - //+ RemoveReceiveHandler( dndReceiveHandler, ip->xid ); - XDestroyWindow(fl_display, ip->xid); - } + MacDestroyWindow(this, ip->xid); #else # if USE_XFT fl_destroy_xft_draw(ip->xid); @@ -1006,7 +982,15 @@ int Fl_Window::handle(int ev) switch (ev) { case FL_SHOW: if (!shown()) show(); - else XMapWindow(fl_display, fl_xid(this)); // extra map calls are harmless + else { +#ifdef __APPLE_QD__ + MacMapWindow(this, fl_xid(this)); +#elif defined(__APPLE_QUARTZ__) + MacMapWindow(this, fl_xid(this)); +#else + XMapWindow(fl_display, fl_xid(this)); // extra map calls are harmless +#endif // __APPLE__ + } break; case FL_HIDE: if (shown()) { @@ -1022,9 +1006,9 @@ int Fl_Window::handle(int ev) if (p->type() >= FL_WINDOW) break; // don't do the unmap } #ifdef __APPLE_QD__ - hide(); + MacUnmapWindow(this, fl_xid(this)); #elif defined(__APPLE_QUARTZ__) - hide(); + MacUnmapWindow(this, fl_xid(this)); #else XUnmapWindow(fl_display, fl_xid(this)); #endif // __APPLE__ |
