From 1a5acb37826aea9ce8719eb7fe7418adab8f964c Mon Sep 17 00:00:00 2001 From: Bill Spitzak Date: Fri, 15 Sep 2000 07:52:51 +0000 Subject: [PATCH] Fl_Gl_Window with an overlay on X always resized any child windows even if you turned resizable() off because it turned it back on to resize the overlay window. This patch avoids changing resizable(). git-svn-id: file:///fltk/svn/fltk/branches/branch-1.0@1301 ea41ed52-d2ee-0310-a9c1-e6b18d33e121 --- src/Fl_Gl_Overlay.cxx | 6 +++--- src/Fl_Gl_Window.cxx | 12 +++++++++--- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/Fl_Gl_Overlay.cxx b/src/Fl_Gl_Overlay.cxx index 1bdacb2d9..17eb82376 100644 --- a/src/Fl_Gl_Overlay.cxx +++ b/src/Fl_Gl_Overlay.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.11 2000/06/29 07:23:56 spitzak Exp $" +// "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.12 2000/09/15 07:52:51 spitzak Exp $" // // OpenGL overlay code for the Fast Light Tool Kit (FLTK). // @@ -159,7 +159,7 @@ void Fl_Gl_Window::make_overlay() { if (can_do_overlay()) { _Fl_Gl_Overlay* o = new _Fl_Gl_Overlay(0,0,w(),h()); overlay = o; - add_resizable(*o); + add(*o); o->show(); return; } @@ -209,5 +209,5 @@ void Fl_Gl_Window::hide_overlay() { #endif // -// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.11 2000/06/29 07:23:56 spitzak Exp $". +// End of "$Id: Fl_Gl_Overlay.cxx,v 1.5.2.12 2000/09/15 07:52:51 spitzak Exp $". // diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 895fa0985..7cecd53e8 100644 --- a/src/Fl_Gl_Window.cxx +++ b/src/Fl_Gl_Window.cxx @@ -1,5 +1,5 @@ // -// "$Id: Fl_Gl_Window.cxx,v 1.12.2.16 2000/07/07 08:38:58 spitzak Exp $" +// "$Id: Fl_Gl_Window.cxx,v 1.12.2.17 2000/09/15 07:52:51 spitzak Exp $" // // OpenGL window code for the Fast Light Tool Kit (FLTK). // @@ -281,7 +281,13 @@ void Fl_Gl_Window::flush() { } void Fl_Gl_Window::resize(int X,int Y,int W,int H) { - if (W != w() || H != h()) valid(0); + if (W != w() || H != h()) { + valid(0); +#ifndef _WIN32 + if (!resizable() && overlay && overlay != this) + ((Fl_Gl_Window*)overlay)->resize(0,0,W,H); +#endif + } Fl_Window::resize(X,Y,W,H); } @@ -331,5 +337,5 @@ void Fl_Gl_Window::draw_overlay() {} #endif // -// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.16 2000/07/07 08:38:58 spitzak Exp $". +// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.17 2000/09/15 07:52:51 spitzak Exp $". //