Hi, here is the patch in quilt format, now that pinentry has changed to that.
Greetings, Joachim -- Joachim "nomeata" Breitner Debian Developer [email protected] | ICQ# 74513189 | GPG-Keyid: 4743206C JID: [email protected] | http://people.debian.org/~nomeata
Index: pinentry-0.7.5/gtk+-2/pinentry-gtk-2.c
===================================================================
--- pinentry-0.7.5.orig/gtk+-2/pinentry-gtk-2.c 2009-02-12 13:12:08.000000000 +0100
+++ pinentry-0.7.5/gtk+-2/pinentry-gtk-2.c 2009-02-12 13:12:19.000000000 +0100
@@ -93,6 +93,22 @@
GDK_HINT_MIN_SIZE | GDK_HINT_MAX_SIZE);
}
+/* Realize the window as transient, if we will grab the keyboard */
+static void
+make_transient (GtkWidget *win, GdkEvent *event, gpointer data)
+{
+ GdkScreen *screen;
+ GdkWindow *root;
+
+ if (!pinentry->grab)
+ return;
+
+ /* Make window transient for the root window */
+ screen = gdk_screen_get_default();
+ root = gdk_screen_get_root_window(screen);
+ gdk_window_set_transient_for(win->window, root);
+
+}
/* Grab the keyboard for maximum security */
static void
@@ -110,6 +126,9 @@
ungrab_keyboard (GtkWidget *win, GdkEvent *event, gpointer data)
{
gdk_keyboard_ungrab (gdk_event_get_time (event));
+
+ /* Unmake window transient for the root window */
+ gdk_window_set_transient_for(win->window, NULL);
}
@@ -263,6 +282,10 @@
/* We need to grab the keyboard when its visible! not when its mapped (there is a difference). */
g_object_set(G_OBJECT(win), "events", GDK_VISIBILITY_NOTIFY_MASK | GDK_STRUCTURE_MASK, NULL);
+ if (pinentry->grab)
+ g_signal_connect (G_OBJECT (win),
+ "realize",
+ G_CALLBACK (make_transient), NULL);
g_signal_connect (G_OBJECT (win),
pinentry->grab ? "visibility-notify-event" : "focus-in-event",
G_CALLBACK (grab_keyboard), NULL);
signature.asc
Description: Dies ist ein digital signierter Nachrichtenteil

