n/pinentry: Patched to fix not-floating dialogs.
parent
fb791153cd
commit
db21fc8764
@ -0,0 +1,49 @@
|
||||
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",
|
@ -1,41 +0,0 @@
|
||||
diff -Naur pinentry-1.0.0.orig/gtk+-2/pinentry-gtk-2.c pinentry-1.0.0/gtk+-2/pinentry-gtk-2.c
|
||||
--- pinentry-1.0.0.orig/gtk+-2/pinentry-gtk-2.c 2016-11-07 10:55:43.000000000 +0100
|
||||
+++ pinentry-1.0.0/gtk+-2/pinentry-gtk-2.c 2017-02-18 15:45:40.468599077 +0100
|
||||
@@ -478,28 +478,17 @@
|
||||
GtkToggleButton *button = GTK_TOGGLE_BUTTON (widget);
|
||||
GtkWidget *label = data;
|
||||
const char *text;
|
||||
- char *tooltip;
|
||||
gboolean reveal;
|
||||
|
||||
if (!gtk_toggle_button_get_active (button) || !confirm_unhiding ())
|
||||
{
|
||||
text = "<span font=\"Monospace\" size=\"xx-small\">abc</span>";
|
||||
- tooltip = pinentry_utf8_validate (pinentry->default_tt_visi);
|
||||
- if (!tooltip)
|
||||
- {
|
||||
- tooltip = g_strdup ("Make the passphrase visible");
|
||||
- }
|
||||
gtk_toggle_button_set_active (button, FALSE);
|
||||
reveal = FALSE;
|
||||
}
|
||||
else
|
||||
{
|
||||
text = "<span font=\"Monospace\" size=\"xx-small\">***</span>";
|
||||
- tooltip = pinentry_utf8_validate (pinentry->default_tt_hide);
|
||||
- if (!tooltip)
|
||||
- {
|
||||
- tooltip = g_strdup ("Hide the passphrase");
|
||||
- }
|
||||
reveal = TRUE;
|
||||
}
|
||||
|
||||
@@ -510,8 +499,6 @@
|
||||
}
|
||||
|
||||
gtk_label_set_markup (GTK_LABEL(label), text);
|
||||
- gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip);
|
||||
- g_free (tooltip);
|
||||
}
|
||||
|
||||
|
@ -1 +0,0 @@
|
||||
85d9ac81ebad3fb082514c505c90c39a0456f1f6 pinentry-1.0.0.tar.bz2
|
@ -0,0 +1 @@
|
||||
1672c2edc1feb036075b187c0773787b2afd0544f55025c645a71b4c2f79275a pinentry-1.0.0.tar.bz2
|
Loading…
Reference in New Issue