diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-07 14:40:16 +0200 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2022-09-07 14:40:16 +0200 |
| commit | 13e05f4204cc636e40fd2591898c482aa0085226 (patch) | |
| tree | 25acdfdf8d5ea774869e577ee94a7e94d8b3e34c /src/Fl_Gl_Window_Driver.H | |
| parent | deeb977c2e99cbd2f6ccfb781c34c7d60de8ebce (diff) | |
Improve support of child windows that may leak outside their parent window.
1) add Wayland code that prevent subwindows from leaking outside their parent.
This does not cover GL subwindows.
2) add macOS code that prevent GL subwindows from leaking outside their parent.
This fixes issue #494 for the macOS platform.
N.B.: Wayland GL subwindows are not prevented from leaking because no solution
that would not require any change in client applications was found. Code that
would cover Wayland GL subwindows but would require client applications to always
use the FL_ALPHA flag is included in this commit in commented out form.
Diffstat (limited to 'src/Fl_Gl_Window_Driver.H')
| -rw-r--r-- | src/Fl_Gl_Window_Driver.H | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Fl_Gl_Window_Driver.H b/src/Fl_Gl_Window_Driver.H index e123c177a..8f3f6cf29 100644 --- a/src/Fl_Gl_Window_Driver.H +++ b/src/Fl_Gl_Window_Driver.H @@ -101,6 +101,9 @@ public: virtual Fl_Font_Descriptor** fontnum_to_fontdescriptor(int fnum); virtual Fl_RGB_Image* capture_gl_rectangle(int x, int y, int w, int h); static inline Fl_Gl_Window_Driver* driver(const Fl_Gl_Window *win) {return win->pGlWindowDriver;} + // true means the platform uses glScissor() to make sure GL subwindows + // don't leak outside their parent window + virtual bool need_scissor() { return false; } }; #endif /* Fl_Gl_Window_Driver_H */ |
