Updating branch refs/heads/bluesabre/display-settings
to a04edfc41ab2035383793ca8315e2e61351108c2 (commit)
from 908e44ea981b845092ef99630d4e4705a35e0f01 (commit)
commit a04edfc41ab2035383793ca8315e2e61351108c2
Author: Jérôme Guelfucci <[email protected]>
Date: Tue Dec 18 22:20:52 2012 +0100
Keep the shortcut dialog above other windows.
This dialog grabs the keyboard which makes it unusable in other
applications, so keeping the window above the other gives a hint on what
is happening.
dialogs/keyboard-settings/xfce-keyboard-settings.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/dialogs/keyboard-settings/xfce-keyboard-settings.c
b/dialogs/keyboard-settings/xfce-keyboard-settings.c
index 5e7a01d..34ae50e 100644
--- a/dialogs/keyboard-settings/xfce-keyboard-settings.c
+++ b/dialogs/keyboard-settings/xfce-keyboard-settings.c
@@ -662,6 +662,12 @@ xfce_keyboard_settings_edit_shortcut (XfceKeyboardSettings
*settings,
/* Request a new shortcut from the user */
dialog = xfce_shortcut_dialog_new ("commands", command, command);
g_signal_connect (dialog, "validate-shortcut", G_CALLBACK
(xfce_keyboard_settings_validate_shortcut), settings);
+
+ /* Try to keep the window above as it grabs the keyboard, we don't
+ * want users to wonder why the keyboard does not work in another
+ * window */
+ gtk_window_set_keep_above (GTK_WINDOW (dialog), TRUE);
+
response = xfce_shortcut_dialog_run (XFCE_SHORTCUT_DIALOG (dialog),
gtk_widget_get_toplevel (GTK_WIDGET (tree_view)));
if (G_LIKELY (response == GTK_RESPONSE_OK))
@@ -974,6 +980,11 @@ xfce_keyboard_settings_add_button_clicked
(XfceKeyboardSettings *settings,
shortcut_dialog = xfce_shortcut_dialog_new ("commands", command,
command);
g_signal_connect (shortcut_dialog, "validate-shortcut", G_CALLBACK
(xfce_keyboard_settings_validate_shortcut), settings);
+ /* Try to keep the window above as it grabs the keyboard, we don't
+ * want users to wonder why the keyboard does not work in another
+ * window */
+ gtk_window_set_keep_above (GTK_WINDOW (shortcut_dialog), TRUE);
+
/* Run shortcut dialog until a valid shortcut is entered or the dialog
is cancelled */
parent = gtk_builder_get_object (GTK_BUILDER (settings),
"keyboard-shortcuts-dialog");
response = xfce_shortcut_dialog_run (XFCE_SHORTCUT_DIALOG
(shortcut_dialog), GTK_WIDGET (parent));
_______________________________________________
Xfce4-commits mailing list
[email protected]
https://mail.xfce.org/mailman/listinfo/xfce4-commits