summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-01 07:31:42 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-01 07:31:42 +0200
commit4196daa77e727846952b11d20b94f457c591d6e4 (patch)
treebb5d9aebe65419c31697876d9d92ef90fa8293f9 /src
parent0627213a824388321b8b39ff2476f5dc04f56638 (diff)
macOS: fixed problem in resizing of widget-containing OpenGL 3 window.
Diffstat (limited to 'src')
-rw-r--r--src/Fl_Gl_Window.cxx1
-rw-r--r--src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm2
2 files changed, 1 insertions, 2 deletions
diff --git a/src/Fl_Gl_Window.cxx b/src/Fl_Gl_Window.cxx
index b6c8f0135..4bd4397e1 100644
--- a/src/Fl_Gl_Window.cxx
+++ b/src/Fl_Gl_Window.cxx
@@ -262,7 +262,6 @@ void Fl_Gl_Window::resize(int X,int Y,int W,int H) {
if (is_a_resize) valid(0);
pGlWindowDriver->resize(is_a_resize, W, H);
Fl_Window::resize(X,Y,W,H);
- //pGlWindowDriver->resize(is_a_resize, W, H);//essai
}
/**
diff --git a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm
index c72fe6c77..429fad370 100644
--- a/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm
+++ b/src/drivers/Cocoa/Fl_Cocoa_Gl_Window_Driver.mm
@@ -322,10 +322,10 @@ void Fl_Cocoa_Gl_Window_Driver::resize(int is_a_resize, int w, int h) {
}
void Fl_Cocoa_Gl_Window_Driver::apply_scissor() {
+ if (glIsEnabled(GL_SCISSOR_TEST)) glDisable(GL_SCISSOR_TEST);
CGRect *extents = Fl_Cocoa_Window_Driver::driver(pWindow)->subRect();
if (extents) {
remove_gl_context_opacity((NSOpenGLContext*)pWindow->context());
- glDisable(GL_SCISSOR_TEST);
GLdouble vals[4];
glGetDoublev(GL_COLOR_CLEAR_VALUE, vals);
glClearColor(0., 0., 0., 0.);