summary refs log tree commit diff stats
path: root/src/common
diff options
context:
space:
mode:
authorPatrick Griffis <tingping@tingping.se>2022-04-16 18:41:34 -0500
committerPatrick Griffis <tingping@tingping.se>2022-04-16 18:41:34 -0500
commit13b6a40b9c3d1f2215ff87cdaff9e38a4020ee92 (patch)
tree29b3d01d4be5596c2aa2c5321ca21bbf3557ae10 /src/common
parentdd167b4c8393677f465c03d66b438d519c43fb87 (diff)
Change preferences sub-dialogs to be modal
This solves the issue where the parent dialog is closed and then
the child dialog is used.

This is however only a partial fix:

- Many other dialogs throughout the codebase do not currently have
  parent windows and need to be refactored.

- Not all window managers respect modal so users can still trigger
  bugs. We can be more defensive against this but it requires more
  refactoring.

Closes #2686
Diffstat (limited to 'src/common')
-rw-r--r--src/common/fe.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/common/fe.h b/src/common/fe.h
index 9da4e230..b8a6279e 100644
--- a/src/common/fe.h
+++ b/src/common/fe.h
@@ -141,6 +141,7 @@ void fe_get_int (char *prompt, int def, void *callback, void *ud);
 #define FRF_NOASKOVERWRITE 32	/* don't ask to overwrite existing files */
 #define FRF_EXTENSIONS 64		/* specify file extensions to be displayed */
 #define FRF_MIMETYPES 128		/* specify file mimetypes to be displayed */
+#define FRF_MODAL 256           /* dialog should be modal to parent */
 void fe_get_file (const char *title, char *initial,
 				 void (*callback) (void *userdata, char *file), void *userdata,
 				 int flags);