From ed37b52fbfbce5d57d0549fac1a9dca2502f3372 Mon Sep 17 00:00:00 2001 From: Monsta Date: Tue, 18 Aug 2015 17:42:19 +0300 Subject: don't lose focus when displaying password prompt dialog fixes https://github.com/mate-desktop/mate-polkit/issues/19 fixes https://github.com/mate-desktop/marco/issues/117 thanks to Jeffrey Knockel (see https://bugzilla.gnome.org/show_bug.cgi?id=676076 and https://bugs.launchpad.net/bugs/946171) --- src/polkitmateauthenticator.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/polkitmateauthenticator.c b/src/polkitmateauthenticator.c index 11d28d2..e5fd4c4 100644 --- a/src/polkitmateauthenticator.c +++ b/src/polkitmateauthenticator.c @@ -26,6 +26,7 @@ #include #include #include +#include #include #include @@ -304,7 +305,8 @@ session_request (PolkitAgentSession *session, } gtk_widget_show_all (GTK_WIDGET (authenticator->dialog)); - gtk_window_present (GTK_WINDOW (authenticator->dialog)); + gtk_window_present_with_time (GTK_WINDOW (authenticator->dialog), + gdk_x11_get_server_time (gtk_widget_get_window (GTK_WIDGET (authenticator->dialog)))); password = polkit_mate_authentication_dialog_run_until_response_for_prompt (POLKIT_MATE_AUTHENTICATION_DIALOG (authenticator->dialog), modified_request, echo_on, -- cgit v1.2.1