From 5226d5aa7e12dc8a05ea49a64caa4c2415752515 Mon Sep 17 00:00:00 2001 From: Matthias Melcher Date: Sat, 23 Jul 2005 12:21:58 +0000 Subject: STR #602 OpenGL Windows inside Tabs that were inside of tabs were not drawn correctly. This was due to the fact that a first 'show' on a Tabs widget would show *all* groups inside the tab (unless the user called 'value(...)' on it first). This was only visible on OS X, because subwindow clipping would wrongfully clip even hidden subwindows. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@4448 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 1 + src/Fl_Tabs.cxx | 2 ++ src/Fl_mac.cxx | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/CHANGES b/CHANGES index 608ada8be..4b574a3de 100644 --- a/CHANGES +++ b/CHANGES @@ -2,6 +2,7 @@ CHANGES IN FLTK 1.1.7 - Documentation fixes (STR #648, STR #692, STR #730, STR #744, STR #745, STR #942) + - Fixed OS X issue with OpenGL windows inside of Tabs (STR #602) - Fluid Code Editor would occasionally not draw the last character in the buffer (STR #798) - Fluid Declaration private flag fixed (STR #799) diff --git a/src/Fl_Tabs.cxx b/src/Fl_Tabs.cxx index 1669ed947..59c06b4d5 100644 --- a/src/Fl_Tabs.cxx +++ b/src/Fl_Tabs.cxx @@ -187,6 +187,8 @@ int Fl_Tabs::handle(int event) { default: break; } + case FL_SHOW: + value(); // update visibilities and fall through default: return Fl_Group::handle(event); diff --git a/src/Fl_mac.cxx b/src/Fl_mac.cxx index 2ba70c91b..2645f63b6 100644 --- a/src/Fl_mac.cxx +++ b/src/Fl_mac.cxx @@ -1916,8 +1916,9 @@ void Fl_Window::make_current() // \todo for performance reasons: we don't have to create this unless the child windows moved for ( Fl_X *cx = i->xidChildren; cx; cx = cx->xidNext ) { - Fl_Region r = NewRgn(); Fl_Window *cw = cx->w; + if (!cw->visible_r()) continue; + Fl_Region r = NewRgn(); SetRectRgn( r, cw->x() - xp, cw->y() - yp, cw->x() + cw->w() - xp, cw->y() + cw->h() - yp ); DiffRgn( fl_window_region, r, fl_window_region ); -- cgit v1.2.3