summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-14 15:38:22 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2022-10-14 15:38:22 +0200
commit531ab614e277dd96c6ebf3318b13689bea517c90 (patch)
tree399738d25a6aa3714b2583db6598318d5fae9ede
parent5fe2932924907223d568a33ccdc98646ce01149c (diff)
Make sure display is open when using native file chooser (#514)
-rw-r--r--src/Fl_Native_File_Chooser_GTK.cxx1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/Fl_Native_File_Chooser_GTK.cxx b/src/Fl_Native_File_Chooser_GTK.cxx
index b99a51ee2..a7300cdd7 100644
--- a/src/Fl_Native_File_Chooser_GTK.cxx
+++ b/src/Fl_Native_File_Chooser_GTK.cxx
@@ -926,6 +926,7 @@ Fl_Native_File_Chooser::Fl_Native_File_Chooser(int val) {
// else, use GTK dialog if available at run-time
// otherwise, use FLTK file chooser.
platform_fnfc = NULL;
+ fl_open_display();
if (Fl::option(Fl::OPTION_FNFC_USES_GTK)) {
#if USE_KDIALOG
const char *desktop = getenv("XDG_CURRENT_DESKTOP");