[PATCH] pinentry-gtk: Always set the window as transient.

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

[PATCH] pinentry-gtk: Always set the window as transient.

Damien Goutte-Gattat
* 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 (at least some)
tiling window managers to make sure the dialog is floating.

GnuPG-bug-id: T3253
Signed-off-by: Damien Goutte-Gattat <[hidden email]>
---
 gtk+-2/pinentry-gtk-2.c | 14 +++++++-------
 1 file changed, 7 insertions(+), 7 deletions(-)

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",
--
2.9.0


_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: [PATCH] pinentry-gtk: Always set the window as transient.

Werner Koch
Pushed.  Thanks.


Salam-Shalom,

   Werner


p.s.
> GnuPG-bug-id: T3253

Please don't prefix the numbger with the 'T" this is just an interal
Phrabicator thing and would trouble us the next time we switch the BTS.

--
Die Gedanken sind frei.  Ausnahmen regelt ein Bundesgesetz.

_______________________________________________
Gnupg-devel mailing list
[hidden email]
http://lists.gnupg.org/mailman/listinfo/gnupg-devel

attachment0 (233 bytes) Download Attachment
Loading...