From 251ec79d40b549d5420042bd406642f68cd43bec Mon Sep 17 00:00:00 2001 From: Michael R Sweet Date: Sat, 4 May 2002 12:49:31 +0000 Subject: Restore window label (title) after drawing the group. git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2194 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- CHANGES | 2 ++ src/Fl_Window.cxx | 8 ++++++-- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/CHANGES b/CHANGES index d5fde1856..4390d8669 100644 --- a/CHANGES +++ b/CHANGES @@ -1,6 +1,8 @@ CHANGES IN FLTK 1.1.0rc2 - Portability fixes. + - Fl_Window::draw() cleared the window label but didn't + restore it, so windows could lose their titles. - Eliminated multiple definitions of dirent structure when compiling under WIN32. - Adjusted the size of the circle that is drawn inside diff --git a/src/Fl_Window.cxx b/src/Fl_Window.cxx index 355850ac1..7326a53e8 100644 --- a/src/Fl_Window.cxx +++ b/src/Fl_Window.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Window.cxx,v 1.6.2.3.2.4 2002/04/28 16:41:16 easysw Exp $" +// "$Id: Fl_Window.cxx,v 1.6.2.3.2.5 2002/05/04 12:49:31 easysw Exp $" // // Window widget class for the Fast Light Tool Kit (FLTK). // @@ -82,10 +82,14 @@ int Fl_Window::y_root() const { } void Fl_Window::draw() { + const char *savelabel = label(); int savex = x(); x(0); int savey = y(); y(0); + // Make sure we don't draw the window title in the window background... Fl_Widget::label(0); Fl_Group::draw(); + // Restore the label... + Fl_Widget::label(savelabel); y(savey); x(savex); } @@ -109,5 +113,5 @@ void Fl_Window::default_callback(Fl_Window* window, void* v) { } // -// End of "$Id: Fl_Window.cxx,v 1.6.2.3.2.4 2002/04/28 16:41:16 easysw Exp $". +// End of "$Id: Fl_Window.cxx,v 1.6.2.3.2.5 2002/05/04 12:49:31 easysw Exp $". // -- cgit v1.2.3