1
0
mirror of synced 2024-12-16 09:41:17 +01:00
ImHex/lib/libimhex/source/helpers
Bernard Teo dd607621d7
build: Update nativefiledialog and keep dialogs on top (#1771)
This PR updates the nativefiledialog submodule and uses its new feature
to set the ImHex main window as the parent of the dialog window. This
ensures that the dialog stays on top of the main window. This is
currently supported by NFDe on Windows, macOS, and Linux/X11.
Linux/Wayland behaves as it did previously due to limitations in NFDe.

Note that macOS file dialogs have already been parented properly as NFDe
previously used the key window (the window currently receiving keyboard
events) on macOS. However, it's probably better to do the correct thing
and pass the main window to NFDe even on macOS.

### Problem description
The file dialog go behind the main window if the main window is clicked
while the file dialog is open.

### Implementation description
Update nativefiledialog and pass the `GLFWwindow*` of the main window to
the library function.

### Screenshots
Before:


https://github.com/WerWolv/ImHex/assets/6948096/589c3401-702a-4b0a-99ed-02d3e4d9080e

After:


https://github.com/WerWolv/ImHex/assets/6948096/8fef4900-eedc-48d5-8a4e-7bd81e37e3c0

### Additional things
I have tested this on Windows and Linux/X11, but did not test this on
macOS. It would be ideal if someone can help with this. (But as far as
NFDe is concerned, macOS `NSWindow*` handles have been tested (with
SDL2) and works.)

Co-authored-by: Nik <werwolv98@gmail.com>
2024-07-03 05:53:55 +00:00
..
crypto.cpp refactor: Get rid of this->m_ 2023-12-19 13:10:25 +01:00
debugging.cpp feat: Added debug variables to aid with development 2023-10-13 23:46:48 +02:00
default_paths.cpp fix: Data paths being stored in config paths instead 2024-06-24 14:27:24 +02:00
encoding_file.cpp fix: Build error due to mismatching types 2024-01-27 16:56:18 +01:00
fs.cpp build: Update nativefiledialog and keep dialogs on top (#1771) 2024-07-03 05:53:55 +00:00
http_requests_emscripten.cpp refactor: Get rid of this->m_ 2023-12-19 13:10:25 +01:00
http_requests_native.cpp impr: Code style improvements 2023-12-27 16:33:49 +01:00
http_requests.cpp fix: Missing include 2023-11-19 16:11:26 +01:00
imgui_hooks.cpp feat: Added simple interactive help system 2024-06-24 22:53:25 +02:00
logger.cpp impr: Make sure assertion handler doesn't get called too often 2024-06-26 19:10:43 +02:00
magic.cpp fix: Replace old defaults path system with a new one 2024-06-22 10:44:55 +02:00
opengl.cpp impr: .0f -> .0F 2024-02-24 23:34:29 +01:00
patches.cpp fix: Misspelling of Endianness (#1609) 2024-03-28 22:25:28 +01:00
tar.cpp impr: Only store paths with forward slashes in project files 2024-05-08 21:30:20 +02:00
utils_linux.cpp impr: General code cleanup 2023-11-10 20:47:08 +01:00
utils_macos.m impr: Show document edited icon in close button on macOS 2024-06-12 19:51:12 +02:00
utils.cpp fix: String truncating being completely borken 2024-06-28 18:29:10 +02:00