summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMonsta <[email protected]>2015-08-18 17:42:19 +0300
committerinfirit <[email protected]>2015-09-01 11:07:02 +0200
commited37b52fbfbce5d57d0549fac1a9dca2502f3372 (patch)
tree7f78d96bcecacd9470c1aaa20df9b0afaf30c643
parent1198fb592fa9dd0ddfed858f37d2aefd9987fca3 (diff)
downloadmate-polkit-ed37b52fbfbce5d57d0549fac1a9dca2502f3372.tar.bz2
mate-polkit-ed37b52fbfbce5d57d0549fac1a9dca2502f3372.tar.xz
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)
-rw-r--r--src/polkitmateauthenticator.c4
1 files changed, 3 insertions, 1 deletions
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 <sys/types.h>
#include <pwd.h>
#include <glib/gi18n.h>
+#include <gdk/gdkx.h>
#include <polkit/polkit.h>
#include <polkitagent/polkitagent.h>
@@ -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,