summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2014-11-11 16:08:09 +0000
committerManolo Gouy <Manolo>2014-11-11 16:08:09 +0000
commite4d4f400a4b42f4713f2d2dc5e29b0c73a7717f1 (patch)
treed77fad5fb4e0e829a11dabd1f72f6da652614331 /src/Fl.cxx
parentf9f4ecedf7c16d160aeb9de0e9cd954b48fa0067 (diff)
Added support of true subwindows to the Mac OS X code. With this, a window inside another
window is just another window with Mac OS as it was already with MSWindows and X11. This requires Mac OS X 10.2. Window nesting to any depth is possible. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10449 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx23
1 files changed, 8 insertions, 15 deletions
diff --git a/src/Fl.cxx b/src/Fl.cxx
index e800d79e7..a08b095ec 100644
--- a/src/Fl.cxx
+++ b/src/Fl.cxx
@@ -681,20 +681,13 @@ Fl_X* Fl_X::first;
Fl_Window* fl_find(Window xid) {
Fl_X *window;
for (Fl_X **pp = &Fl_X::first; (window = *pp); pp = &window->next)
-#if defined(WIN32) || defined(USE_X11)
- if (window->xid == xid)
-#elif defined(__APPLE_QUARTZ__)
- if (window->xid == xid && !window->w->window())
-#else
-# error unsupported platform
-#endif // __APPLE__
- {
+ if (window->xid == xid) {
if (window != Fl_X::first && !Fl::modal()) {
- // make this window be first to speed up searches
- // this is not done if modal is true to avoid messing up modal stack
- *pp = window->next;
- window->next = Fl_X::first;
- Fl_X::first = window;
+ // make this window be first to speed up searches
+ // this is not done if modal is true to avoid messing up modal stack
+ *pp = window->next;
+ window->next = Fl_X::first;
+ Fl_X::first = window;
}
return window->w;
}
@@ -1505,7 +1498,6 @@ void Fl_Window::hide() {
for (; *pp != ip; pp = &(*pp)->next) if (!*pp) return;
*pp = ip->next;
#ifdef __APPLE__
- ip->unlink();
// MacOS X manages a single pointer per application. Make sure that hiding
// a toplevel window will not leave us with some random pointer shape, or
// worst case, an invisible pointer
@@ -1556,7 +1548,7 @@ void Fl_Window::hide() {
}
#elif defined(__APPLE_QUARTZ__)
Fl_X::q_release_context(ip);
- if ( ip->xid == fl_window && !parent() )
+ if ( ip->xid == fl_window )
fl_window = 0;
#endif
@@ -1584,6 +1576,7 @@ void Fl_Window::hide() {
if (count) delete[] doit;
#elif defined(__APPLE_QUARTZ__)
ip->destroy();
+ delete ip->subRect;
#else
# error unsupported platform
#endif