From fcdc2f0e102497313232cc7c0a570cc4c524a02b Mon Sep 17 00:00:00 2001 From: ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> Date: Tue, 30 Aug 2022 12:58:57 +0200 Subject: Attempt to improve fl_disable_wayland(). --- src/Fl.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/Fl.cxx') diff --git a/src/Fl.cxx b/src/Fl.cxx index 7b7cb2b7e..3ba27a703 100644 --- a/src/Fl.cxx +++ b/src/Fl.cxx @@ -2015,6 +2015,15 @@ void fl_close_display() Fl::screen_driver()->close_display(); } +/** Prevent the FLTK library from using its wayland backend. + Call this early in your main(), before fl_open_display() runs. + This has no effect on non-Wayland platforms. + */ +void fl_disable_wayland() +{ + Fl::system_driver()->disable_wayland(); +} + FL_EXPORT Window fl_xid_(const Fl_Window *w) { Fl_X *temp = Fl_X::i(w); return temp ? (Window)temp->xid : 0; -- cgit v1.2.3