summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-09-07 16:50:14 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2024-09-07 16:50:14 +0200
commit2a87244ae3450496120917af1d95d8e833fa270a (patch)
treef13685b244885a9ffd86579686d5feba14800446 /src
parent17cebc851bc55994c0e38dd3516e7f5f56f54808 (diff)
Add support of GL with Wayland for Linux on Apple hardware
Diffstat (limited to 'src')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
index 09758e422..384c4a205 100644
--- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx
@@ -209,6 +209,11 @@ void Fl_Wayland_Gl_Window_Driver::set_gl_context(Fl_Window* w, GLContext context
Fl::error("eglMakeCurrent() failed\n");
}
}
+ if (!(mode() & FL_ALPHA)) { // useful at least for Linux on MacBook hardware
+ GLfloat vals[4];
+ glGetFloatv(GL_COLOR_CLEAR_VALUE, vals);
+ if (vals[3] == 0.) glClearColor(vals[0], vals[1], vals[2], 1.);
+ }
}
/* CONTROL_LEAKING_SUB_GL_WINDOWS