From 46e681561241d0a123dfc08c234745c40c4a262a Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Sun, 4 Jan 2026 16:45:11 +0100 Subject: Windows: improve moving window across screens having distinct scale factors. --- src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx') diff --git a/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx b/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx index 375408496..8e199b09c 100644 --- a/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx +++ b/src/drivers/WinAPI/Fl_WinAPI_Gl_Window_Driver.cxx @@ -454,6 +454,19 @@ void Fl_WinAPI_Gl_Window_Driver::switch_back() { } +class Fl_WinAPI_Gl_Plugin : public Fl_WinAPI_Plugin { +public: + Fl_WinAPI_Gl_Plugin() : Fl_WinAPI_Plugin(name()) { } + const char *name() override { return "gl.winapi.fltk.org"; } + void invalidate(Fl_Window *w) override { + w->as_gl_window()->valid(0); + } +}; + + +static Fl_WinAPI_Gl_Plugin Gl_Invalidate_Plugin; + + FL_EXPORT HGLRC fl_win32_glcontext(GLContext rc) { return (HGLRC)rc; } #endif // HAVE_GL -- cgit v1.2.3