Make sure display is open when using native file chooser (#514)

This commit is contained in:
ManoloFLTK 2022-10-14 15:38:22 +02:00
parent 5fe2932924
commit 531ab614e2
1 changed files with 1 additions and 0 deletions

View File

@ -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");