summaryrefslogtreecommitdiff
path: root/src/Fl.cxx
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-08-30 12:58:57 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-08-30 12:58:57 +0200
commitfcdc2f0e102497313232cc7c0a570cc4c524a02b (patch)
tree1ffc8c6fcbe0a2de801a055d2dce46d60f320dac /src/Fl.cxx
parent84af9661098286335e7c1d1d9ec6d407e05b1d21 (diff)
Attempt to improve fl_disable_wayland().
Diffstat (limited to 'src/Fl.cxx')
-rw-r--r--src/Fl.cxx9
1 files changed, 9 insertions, 0 deletions
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;