diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-11-30 17:51:35 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-11-30 17:51:35 +0100 |
| commit | 67817f696cf8ab47f6f4bee89313367cf0462cea (patch) | |
| tree | c66d30d0a070a7d1e10adae6d6b54ae31d11d64d /src/drivers/Wayland | |
| parent | b7ce83c02bbdd211c4c5c7f4b927e414e0c9976e (diff) | |
Remove small files fl_XXX_gl_platform_init.cxx
The single-function content of these files is moved to Fl_XXX_Gl_Window_Driver.cxx.
Diffstat (limited to 'src/drivers/Wayland')
| -rw-r--r-- | src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx | 12 | ||||
| -rw-r--r-- | src/drivers/Wayland/fl_wayland_gl_platform_init.cxx | 36 |
2 files changed, 12 insertions, 36 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx index 59f92663f..86aeee8b7 100644 --- a/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx +++ b/src/drivers/Wayland/Fl_Wayland_Gl_Window_Driver.cxx @@ -23,6 +23,9 @@ #include "Fl_Wayland_Window_Driver.H" #include "Fl_Wayland_Graphics_Driver.H" #include "Fl_Wayland_Gl_Window_Driver.H" +#ifdef FLTK_USE_X11 +# include "../X11/Fl_X11_Gl_Window_Driver.H" +#endif #include <wayland-egl.h> #include <EGL/egl.h> #include <FL/gl.h> @@ -73,6 +76,15 @@ Fl_Wayland_Gl_Window_Driver::Fl_Wayland_Gl_Window_Driver(Fl_Gl_Window *win) : Fl } +Fl_Gl_Window_Driver *Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *w) +{ +#ifdef FLTK_USE_X11 + if (!Fl_Wayland_Screen_Driver::wl_display) return new Fl_X11_Gl_Window_Driver(w); +#endif + return new Fl_Wayland_Gl_Window_Driver(w); +} + + void Fl_Wayland_Gl_Window_Driver::init() { EGLint major, minor; diff --git a/src/drivers/Wayland/fl_wayland_gl_platform_init.cxx b/src/drivers/Wayland/fl_wayland_gl_platform_init.cxx deleted file mode 100644 index 1c734be47..000000000 --- a/src/drivers/Wayland/fl_wayland_gl_platform_init.cxx +++ /dev/null @@ -1,36 +0,0 @@ -// -// Wayland-specific code to initialize wayland support. -// -// Copyright 2022 by Bill Spitzak and others. -// -// This library is free software. Distribution and use rights are outlined in -// the file "COPYING" which should have been included with this file. If this -// file is missing or damaged, see the license at: -// -// https://www.fltk.org/COPYING.php -// -// Please see the following page on how to report bugs and issues: -// -// https://www.fltk.org/bugs.php -// - -#include <config.h> -#if HAVE_GL - -#include "Fl_Wayland_Gl_Window_Driver.H" -#include "Fl_Wayland_Screen_Driver.H" -#ifdef FLTK_USE_X11 -#include "../X11/Fl_X11_Gl_Window_Driver.H" -#endif - -Fl_Gl_Window_Driver *Fl_Gl_Window_Driver::newGlWindowDriver(Fl_Gl_Window *w) -{ -#ifdef FLTK_USE_X11 - if (Fl_Wayland_Screen_Driver::wl_display) return new Fl_Wayland_Gl_Window_Driver(w); - return new Fl_X11_Gl_Window_Driver(w); -#else - return new Fl_Wayland_Gl_Window_Driver(w); -#endif -} - -#endif // HAVE_GL |
