LWJGL / lwjgl3

LWJGL is a Java library that enables cross-platform access to popular native APIs useful in the development of graphics (OpenGL, Vulkan, bgfx), audio (OpenAL, Opus), parallel computing (OpenCL, CUDA) and XR (OpenVR, LibOVR, OpenXR) applications.
https://www.lwjgl.org
BSD 3-Clause "New" or "Revised" License
4.67k stars 629 forks source link

lwjgl-nfd doesn't use Flatpak file portal #893

Closed MMarco94 closed 10 months ago

MMarco94 commented 1 year ago

Version

3.3.2

Platform

Linux x64

JDK

openjdk17

Module

NFD

Bug description

When calling NativeFileDialog.NFD_PickFolder or NativeFileDialog.NFD_OpenDialog witrhin the Flatpak runtime, I would expect it to use the Flatpak file portal.

However, they instead open a "native" looking file picker dialog that doesn't have full file system access.

nativefiledialog-extended should support file portal, and I can see that you do have some code to support them, however it is not working for me at all.

Stacktrace or crash log output

No response

Spasi commented 10 months ago

Hey @MMarco94,

The next 3.3.3 snapshot will include optional support for Portal. Can be enabled with Configuration.NFD_LINUX_PORTAL.set(true) (or with the -Dorg.lwjgl.nfd.linux.portal=true system property).

Thanks!

MMarco94 commented 10 months ago

That's amazing, thanks!