macOS: fixed problem in resizing of widget-containing OpenGL 3 window.

This commit is contained in:
ManoloFLTK 2022-10-01 07:31:42 +02:00
parent 0627213a82
commit 4196daa77e
2 changed files with 1 additions and 2 deletions

View File

@ -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
}
/**

View File

@ -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.);