1 |
commit: 2fabf9cabaf1f4bab9f924afa116d1c7d84680b9 |
2 |
Author: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
3 |
AuthorDate: Mon Oct 16 21:14:28 2017 +0000 |
4 |
Commit: Kristian Fiskerstrand <k_f <AT> gentoo <DOT> org> |
5 |
CommitDate: Mon Oct 16 21:14:43 2017 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2fabf9ca |
7 |
|
8 |
app-crypt/pinentry: Fix grabbing issue in awesomewm |
9 |
|
10 |
Bug: https://bugs.gentoo.org/609678 |
11 |
Package-Manager: Portage-2.3.8, Repoman-2.3.3 |
12 |
|
13 |
...isable-tooltips-in-keyboard-grabbing-mode.patch | 47 ++++++++++++++++++++++ |
14 |
...nentry-1.0.0-gtk2-Fix-a-problem-with-fvwm.patch | 47 ++++++++++++++++++++++ |
15 |
...ry-1.0.0-r1.ebuild => pinentry-1.0.0-r2.ebuild} | 2 + |
16 |
3 files changed, 96 insertions(+) |
17 |
|
18 |
diff --git a/app-crypt/pinentry/files/pinentry-1.0.0-Disable-tooltips-in-keyboard-grabbing-mode.patch b/app-crypt/pinentry/files/pinentry-1.0.0-Disable-tooltips-in-keyboard-grabbing-mode.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..7724d1beae8 |
21 |
--- /dev/null |
22 |
+++ b/app-crypt/pinentry/files/pinentry-1.0.0-Disable-tooltips-in-keyboard-grabbing-mode.patch |
23 |
@@ -0,0 +1,47 @@ |
24 |
+From 1590b664d88be8386a4664c2994b685187d1eb25 Mon Sep 17 00:00:00 2001 |
25 |
+From: Damien Goutte-Gattat <dgouttegattat@××××××.org> |
26 |
+Date: Thu, 3 Aug 2017 22:56:49 +0200 |
27 |
+Subject: [PATCH 1/6] gtk: Disable tooltips in keyboard-grabbing mode. |
28 |
+ |
29 |
+* gtk+-2:/pinentry-gtk-2.c (show_hide_button): Do not show the |
30 |
+tooltip if we attempt to grab the keyboard. |
31 |
+(create_window): Likewise. |
32 |
+-- |
33 |
+ |
34 |
+For unclear reasons, those tooltips may interfere with grabbing |
35 |
+under some tiling window managers. |
36 |
+ |
37 |
+GnuPG-bug-id: 3297 |
38 |
+Signed-off-by: Damien Goutte-Gattat <dgouttegattat@××××××.org> |
39 |
+--- |
40 |
+ gtk+-2/pinentry-gtk-2.c | 7 +++++-- |
41 |
+ 1 file changed, 5 insertions(+), 2 deletions(-) |
42 |
+ |
43 |
+diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c |
44 |
+index d467ec5..f17a702 100644 |
45 |
+--- a/gtk+-2/pinentry-gtk-2.c |
46 |
++++ b/gtk+-2/pinentry-gtk-2.c |
47 |
+@@ -516,7 +516,10 @@ show_hide_button_toggled (GtkWidget *widget, gpointer data) |
48 |
+ } |
49 |
+ |
50 |
+ gtk_label_set_markup (GTK_LABEL(label), text); |
51 |
+- gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip); |
52 |
++ if (!pinentry->grab) |
53 |
++ { |
54 |
++ gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip); |
55 |
++ } |
56 |
+ g_free (tooltip); |
57 |
+ } |
58 |
+ |
59 |
+@@ -736,7 +739,7 @@ create_window (pinentry_t ctx) |
60 |
+ gtk_progress_bar_set_text (GTK_PROGRESS_BAR (qualitybar), |
61 |
+ QUALITYBAR_EMPTY_TEXT); |
62 |
+ gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (qualitybar), 0.0); |
63 |
+- if (pinentry->quality_bar_tt) |
64 |
++ if (pinentry->quality_bar_tt && !pinentry->grab) |
65 |
+ { |
66 |
+ #if !GTK_CHECK_VERSION (2, 12, 0) |
67 |
+ gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), qualitybar, |
68 |
+-- |
69 |
+2.13.6 |
70 |
+ |
71 |
|
72 |
diff --git a/app-crypt/pinentry/files/pinentry-1.0.0-gtk2-Fix-a-problem-with-fvwm.patch b/app-crypt/pinentry/files/pinentry-1.0.0-gtk2-Fix-a-problem-with-fvwm.patch |
73 |
new file mode 100644 |
74 |
index 00000000000..f7476de1ff6 |
75 |
--- /dev/null |
76 |
+++ b/app-crypt/pinentry/files/pinentry-1.0.0-gtk2-Fix-a-problem-with-fvwm.patch |
77 |
@@ -0,0 +1,47 @@ |
78 |
+From b0e0bdeac5d40ca645afc9017778b39a26303523 Mon Sep 17 00:00:00 2001 |
79 |
+From: Werner Koch <wk@×××××.org> |
80 |
+Date: Wed, 11 Jan 2017 18:40:17 +0100 |
81 |
+Subject: [PATCH 01/25] gtk2: Fix a problem with fvwm |
82 |
+ |
83 |
+* gtk+-2/pinentry-gtk-2.c (grab_pointer): Take care of |
84 |
+GDK_GRAB_ALREADY_GRABBED. |
85 |
+-- |
86 |
+ |
87 |
+Debian-bug-id: 850708 |
88 |
+Co-authored-by: Vincent Lefevre <vincent@××××××.net> |
89 |
+Signed-off-by: Werner Koch <wk@×××××.org> |
90 |
+--- |
91 |
+ gtk+-2/pinentry-gtk-2.c | 10 ++++++++-- |
92 |
+ 1 file changed, 8 insertions(+), 2 deletions(-) |
93 |
+ |
94 |
+diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c |
95 |
+index 473c4aa..e37601f 100644 |
96 |
+--- a/gtk+-2/pinentry-gtk-2.c |
97 |
++++ b/gtk+-2/pinentry-gtk-2.c |
98 |
+@@ -203,7 +203,12 @@ grab_pointer (GtkWidget *win, GdkEvent *event, gpointer data) |
99 |
+ (void)data; |
100 |
+ |
101 |
+ /* Change the cursor for the duration of the grab to indicate that |
102 |
+- something is going on. */ |
103 |
++ * something is going on. The fvwm window manager grabs the pointer |
104 |
++ * for a short time and thus we may end up with the already grabbed |
105 |
++ * error code. Actually this error code should be used to detect a |
106 |
++ * malicious grabbing application but with fvwm this renders |
107 |
++ * Pinentry only unusable. Thus we try again several times also for |
108 |
++ * that error code. See Debian bug 850708 for details. */ |
109 |
+ /* XXX: It would be nice to have a key cursor, unfortunately there |
110 |
+ is none readily available. */ |
111 |
+ cursor = gdk_cursor_new_for_display (gtk_widget_get_display (win), |
112 |
+@@ -215,7 +220,8 @@ grab_pointer (GtkWidget *win, GdkEvent *event, gpointer data) |
113 |
+ NULL /* confine to */, |
114 |
+ cursor, |
115 |
+ gdk_event_get_time (event)); |
116 |
+- while (tries++ < max_tries && err == GDK_GRAB_NOT_VIEWABLE); |
117 |
++ while (tries++ < max_tries && (err == GDK_GRAB_NOT_VIEWABLE |
118 |
++ || err == GDK_GRAB_ALREADY_GRABBED)); |
119 |
+ |
120 |
+ if (err) |
121 |
+ { |
122 |
+-- |
123 |
+2.13.6 |
124 |
+ |
125 |
|
126 |
diff --git a/app-crypt/pinentry/pinentry-1.0.0-r1.ebuild b/app-crypt/pinentry/pinentry-1.0.0-r2.ebuild |
127 |
similarity index 95% |
128 |
rename from app-crypt/pinentry/pinentry-1.0.0-r1.ebuild |
129 |
rename to app-crypt/pinentry/pinentry-1.0.0-r2.ebuild |
130 |
index 23de2e2209d..f26a7c9f5bc 100644 |
131 |
--- a/app-crypt/pinentry/pinentry-1.0.0-r1.ebuild |
132 |
+++ b/app-crypt/pinentry/pinentry-1.0.0-r2.ebuild |
133 |
@@ -50,6 +50,8 @@ DOCS=( AUTHORS ChangeLog NEWS README THANKS TODO ) |
134 |
PATCHES=( |
135 |
"${FILESDIR}/${PN}-0.8.2-ncurses.patch" |
136 |
"${FILESDIR}/${P}-build.patch" |
137 |
+ "${FILESDIR}/${P}-Disable-tooltips-in-keyboard-grabbing-mode.patch" |
138 |
+ "${FILESDIR}/${P}-gtk2-Fix-a-problem-with-fvwm.patch" |
139 |
) |
140 |
|
141 |
src_prepare() { |