diff options
| author | Jay Lanagan <j@lngn.net> | 2025-09-29 09:51:28 -0400 |
|---|---|---|
| committer | Jay Lanagan <j@lngn.net> | 2025-09-29 09:51:28 -0400 |
| commit | 9a6af577ce42cb73efc98c09ab1ef6f9e0083153 (patch) | |
| tree | 883063343f20fe827c5aecdaa40fa9ddde2ecaf2 /polkit-gnome/0004-Use-fresh-X11-timestamps-when-displaying-authenticat.patch | |
| parent | ab119e4809a15d37522b7aea45d55911f8d43ac9 (diff) | |
| download | crux-xfce4-9a6af577ce42cb73efc98c09ab1ef6f9e0083153.tar.gz crux-xfce4-9a6af577ce42cb73efc98c09ab1ef6f9e0083153.zip | |
xfce4: initial migration
Diffstat (limited to 'polkit-gnome/0004-Use-fresh-X11-timestamps-when-displaying-authenticat.patch')
| -rw-r--r-- | polkit-gnome/0004-Use-fresh-X11-timestamps-when-displaying-authenticat.patch | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/polkit-gnome/0004-Use-fresh-X11-timestamps-when-displaying-authenticat.patch b/polkit-gnome/0004-Use-fresh-X11-timestamps-when-displaying-authenticat.patch new file mode 100644 index 0000000..83ad38d --- /dev/null +++ b/polkit-gnome/0004-Use-fresh-X11-timestamps-when-displaying-authenticat.patch @@ -0,0 +1,45 @@ +From: Jeffrey Knockel <jeff250@gmail.com> +Date: Mon, 30 Apr 2018 18:05:20 +0000 +Subject: Use fresh X11 timestamps when displaying authentication dialog + +This circumvents focus-stealing prevention. + +Bug: https://bugzilla.gnome.org/show_bug.cgi?id=676076 +Bug-Debian: https://bugs.debian.org/684300 +Bug-Ubuntu: https://launchpad.net/bugs/946171 +--- + src/polkitgnomeauthenticator.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/src/polkitgnomeauthenticator.c b/src/polkitgnomeauthenticator.c +index 23163b4..e57d76e 100644 +--- a/src/polkitgnomeauthenticator.c ++++ b/src/polkitgnomeauthenticator.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> +@@ -306,7 +307,17 @@ session_request (PolkitAgentSession *session, + } + + gtk_widget_show_all (GTK_WIDGET (authenticator->dialog)); +- gtk_window_present (GTK_WINDOW (authenticator->dialog)); ++ GdkWindow *window = gtk_widget_get_window (GTK_WIDGET (authenticator->dialog)); ++ ++ if (GDK_IS_X11_WINDOW (window)) ++ { ++ gtk_window_present_with_time (GTK_WINDOW (authenticator->dialog), gdk_x11_get_server_time (window)); ++ } ++ else ++ { ++ gtk_window_present (GTK_WINDOW (authenticator->dialog)); ++ } ++ + password = polkit_gnome_authentication_dialog_run_until_response_for_prompt (POLKIT_GNOME_AUTHENTICATION_DIALOG (authenticator->dialog), + modified_request, + echo_on, + |
