From 5952355b06c36b75185a63bccf131d20eeac18aa Mon Sep 17 00:00:00 2001 From: Istvan Petres Date: Sun, 9 Jun 2024 14:53:51 +0300 Subject: [PATCH] Fixed other windows to be focusable in transient mode and added print_help_msg for this new -transient-window option. --- source/rofi.c | 3 +++ source/xcb.c | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/source/rofi.c b/source/rofi.c index 175db7711..9ebe28df6 100644 --- a/source/rofi.c +++ b/source/rofi.c @@ -326,6 +326,9 @@ static void print_main_application_options(int is_term) { is_term); print_help_msg("-normal-window", "", "Behave as a normal window. (experimental)", NULL, is_term); + print_help_msg("-transient-window", "", + "Behave as a modal dialog that is transient to the currently " + "focused window. (experimental)", NULL, is_term); print_help_msg("-show", "[mode]", "Show the mode 'mode' and exit. The mode has to be enabled.", NULL, is_term); diff --git a/source/xcb.c b/source/xcb.c index 2b50ccb0c..6ad34b538 100644 --- a/source/xcb.c +++ b/source/xcb.c @@ -1898,7 +1898,7 @@ gboolean display_late_setup(void) { // Try to grab the keyboard as early as possible. // We grab this using the rootwindow (as dmenu does it). // this seems to result in the smallest delay for most people. - if (find_arg("-normal-window") >= 0) { + if (find_arg("-normal-window") >= 0 || find_arg("-transient-window") >= 0) { return TRUE; } if (find_arg("-no-lazy-grab") >= 0) {