summaryrefslogtreecommitdiff
path: root/src/Fl_Gl_Window.cxx
diff options
context:
space:
mode:
authorManolo Gouy <Manolo>2015-01-31 15:08:31 +0000
committerManolo Gouy <Manolo>2015-01-31 15:08:31 +0000
commit8887600f5fcd31cf67a38bffee68d2f876cb3b84 (patch)
tree0d50b5cd3bfb7dd2e08239fa14598c5687718b9e /src/Fl_Gl_Window.cxx
parent22b4288c23da68338be7a270ffe4ec802c27233e (diff)
Improved Mac OS X Fl_Gl_Window resizing: the GL scene was drawn twice at each resize operation.
git-svn-id: file:///fltk/svn/fltk/branches/branch-1.3@10545 ea41ed52-d2ee-0310-a9c1-e6b18d33e121
Diffstat (limited to 'src/Fl_Gl_Window.cxx')
-rw-r--r--src/Fl_Gl_Window.cxx10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index 2c6ffd916..f52703e85 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -434,6 +434,10 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) {
int is_a_resize = (W != Fl_Widget::w() || H != Fl_Widget::h());
if (is_a_resize) valid(0);
+
+#ifdef __APPLE__
+ if (Fl_X::i(this)->in_windowDidResize()) gl_context_update(context_);
+#endif
#if ! ( defined(__APPLE__) || defined(WIN32) )
if (is_a_resize && !resizable() && overlay && overlay != this) {
@@ -442,12 +446,6 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) {
#endif
Fl_Window::resize(X,Y,W,H);
-#ifdef __APPLE__
- if (is_a_resize) {
- gl_context_update(context_);
- redraw();
- }
-#endif
}
/**