You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
49 lines
1.7 KiB
49 lines
1.7 KiB
commit c693cc177fe79de8d173086fb578fe525a1b2a6b |
|
Author: Damien Goutte-Gattat <dgouttegattat@incenp.org> |
|
Date: Wed Jul 5 11:12:56 2017 +0200 |
|
|
|
gtk: Always set the window as transient. |
|
|
|
* gtk+-2/pinentry-gtk-2.c (create_window): Setup the make_transient |
|
callback whether we ask for a passphrase or not. |
|
-- |
|
|
|
Making the window transient seems necessary for (some) tiling window |
|
managers to make sure the dialog is floating. |
|
|
|
GnuPG-bug-id: T3253 |
|
|
|
diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c |
|
index dee0360..d467ec5 100644 |
|
--- a/gtk+-2/pinentry-gtk-2.c |
|
+++ b/gtk+-2/pinentry-gtk-2.c |
|
@@ -113,9 +113,9 @@ constrain_size (GtkWidget *win, GtkRequisition *req, gpointer data) |
|
} |
|
|
|
|
|
-/* Realize the window as transient if we grab the keyboard. This |
|
- makes the window a modal dialog to the root window, which helps the |
|
- window manager. See the following quote from: |
|
+/* Realize the window as transient. This makes the window a modal |
|
+ dialog to the root window, which helps the window manager. |
|
+ See the following quote from: |
|
https://standards.freedesktop.org/wm-spec/wm-spec-1.4.html#id2512420 |
|
|
|
Implementing enhanced support for application transient windows |
|
@@ -586,12 +586,12 @@ create_window (pinentry_t ctx) |
|
#endif |
|
g_signal_connect (G_OBJECT (win), "size-request", |
|
G_CALLBACK (constrain_size), NULL); |
|
+ |
|
+ g_signal_connect (G_OBJECT (win), |
|
+ "realize", G_CALLBACK (make_transient), NULL); |
|
+ |
|
if (!confirm_mode) |
|
{ |
|
- if (pinentry->grab) |
|
- g_signal_connect (G_OBJECT (win), |
|
- "realize", G_CALLBACK (make_transient), NULL); |
|
- |
|
/* We need to grab the keyboard when its visible! not when its |
|
mapped (there is a difference) */ |
|
g_object_set (G_OBJECT(win), "events",
|
|
|