diff options
| author | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-01-14 20:17:00 +0000 |
|---|---|---|
| committer | Michael R Sweet <michael.r.sweet@gmail.com> | 2003-01-14 20:17:00 +0000 |
| commit | 0df204ff51adce4030a2bb134608ace92b4eb776 (patch) | |
| tree | bf8f57d070ee7100775a6fe4ffc4168427464ac0 | |
| parent | 3b597088381e65057b5cbb9bc6d92667c58b36a7 (diff) | |
Fix OpenGL resize bug.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.1@2904 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
| -rw-r--r-- | CHANGES | 2 | ||||
| -rw-r--r-- | src/Fl_Gl_Window.cxx | 14 |
2 files changed, 13 insertions, 3 deletions
@@ -1,6 +1,8 @@ CHANGES IN FLTK 1.1.3 - Documentation updates. + - OpenGL windows didn't resize correctly on MacOS X. + [SF Bug #667855] - The menus incorrectly used the overlay visual when one or more menu items contained an image. [SF Bug #653846] - Changed some error messages to use Fl::error() instead diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx index 3669115ec..66a1202e4 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.22.2.15 2002/12/04 04:44:54 easysw Exp $" +// "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.16 2003/01/14 20:17:00 easysw Exp $" // // OpenGL window code for the Fast Light Tool Kit (FLTK). // @@ -317,6 +317,12 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) { if (W != w() || H != h()) { valid(0); #ifdef __APPLE__ + GLint xywh[4]; + xywh[0] = X; + xywh[1] = window()->h() - Y - H; + xywh[2] = W; + xywh[3] = H; + aglSetInteger(context_, AGL_BUFFER_RECT, xywh); aglUpdateContext(context_); #elif !defined(WIN32) if (!resizable() && overlay && overlay != this) @@ -361,7 +367,9 @@ void Fl_Gl_Window::init() { valid_ = 0; damage1_ = 0; - resize(x(), y(), w(), h()); + int H = h(); + h(1); // Make sure we actually do something in resize()... + resize(x(), y(), w(), H); } void Fl_Gl_Window::draw_overlay() {} @@ -369,5 +377,5 @@ void Fl_Gl_Window::draw_overlay() {} #endif // -// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.15 2002/12/04 04:44:54 easysw Exp $". +// End of "$Id: Fl_Gl_Window.cxx,v 1.12.2.22.2.16 2003/01/14 20:17:00 easysw Exp $". // |
