diff options
| author | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-10-07 17:14:11 +0200 |
|---|---|---|
| committer | Albrecht Schlosser <albrechts.fltk@online.de> | 2023-10-07 17:14:11 +0200 |
| commit | 1fd6f0dd3af3183c0b41b94eae1379f8e60f3d96 (patch) | |
| tree | db2c9bc3c39df84a63b9d66f6d135857b6edaae9 /test/CMakeLists.txt | |
| parent | f6690a974245407c5d266dcb688db694e51a3bb4 (diff) | |
Fix STR 3458: "GLUT compatibility mode segfaults"
... "when there's no current window".
Silently ignore GLUT function calls that need a current window if the
current window is NULL, return 0 from functions that return an 'int'.
Check if window is shown in Fl_X11_Gl_Window_Driver::swap_buffers().
This would issue "XRequest.nnn: GLXBadDrawable 0x0" on X11 otherwise.
Note: the chosen implementation to ignore GLUT calls silently appears
to be compatible with GLUT (3.7) whereas FreeGLUT 3.0 would issue error
messages and exit. The latter could be implemented as well but would
be much more work.
Diffstat (limited to 'test/CMakeLists.txt')
| -rw-r--r-- | test/CMakeLists.txt | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt index 1687ebfb8..a44498c4d 100644 --- a/test/CMakeLists.txt +++ b/test/CMakeLists.txt @@ -87,11 +87,17 @@ CREATE_EXAMPLE (flex_login flex_login.cxx fltk) CREATE_EXAMPLE (fltk-versions fltk-versions.cxx fltk) CREATE_EXAMPLE (fonts fonts.cxx fltk) CREATE_EXAMPLE (forms forms.cxx "fltk_forms;fltk") + +if (OPENGL_FOUND) + CREATE_EXAMPLE (glut_test glut_test.cxx "fltk_gl;fltk") +endif() + if (OPENGL_FOUND) CREATE_EXAMPLE (handle_events handle_events.cxx "fltk_gl;fltk") # opt. Fl_Gl_Window else() CREATE_EXAMPLE (handle_events handle_events.cxx fltk) # w/o Fl_Gl_Window endif() + CREATE_EXAMPLE (hello hello.cxx fltk) CREATE_EXAMPLE (help_dialog help_dialog.cxx "fltk_images;fltk") CREATE_EXAMPLE (icon icon.cxx fltk) |
