From d7c086ed8b3308903adce92d5da980cd8282fb92 Mon Sep 17 00:00:00 2001 From: Damien Goutte-Gattat Date: Fri, 4 Aug 2017 20:37:14 +0200 Subject: [PATCH] n/pinentry: Applied patch to disable Gtk2 tooltips. --- ...pinentry-1.0.0-gtk2-disable-tooltips.patch | 42 +++++++++++++++++++ n/pinentry/pinentry.SlackBuild | 5 ++- 2 files changed, 46 insertions(+), 1 deletion(-) create mode 100644 n/pinentry/pinentry-1.0.0-gtk2-disable-tooltips.patch diff --git a/n/pinentry/pinentry-1.0.0-gtk2-disable-tooltips.patch b/n/pinentry/pinentry-1.0.0-gtk2-disable-tooltips.patch new file mode 100644 index 00000000..68c99a4d --- /dev/null +++ b/n/pinentry/pinentry-1.0.0-gtk2-disable-tooltips.patch @@ -0,0 +1,42 @@ +commit 1590b664d88be8386a4664c2994b685187d1eb25 +Author: Damien Goutte-Gattat +Date: Thu Aug 3 22:56:49 2017 +0200 + + gtk: Disable tooltips in keyboard-grabbing mode. + + * gtk+-2:/pinentry-gtk-2.c (show_hide_button): Do not show the + tooltip if we attempt to grab the keyboard. + (create_window): Likewise. + -- + + For unclear reasons, those tooltips may interfere with grabbing + under some tiling window managers. + + GnuPG-bug-id: 3297 + Signed-off-by: Damien Goutte-Gattat + +diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c +index d467ec5..f17a702 100644 +--- a/gtk+-2/pinentry-gtk-2.c ++++ b/gtk+-2/pinentry-gtk-2.c +@@ -516,7 +516,10 @@ show_hide_button_toggled (GtkWidget *widget, gpointer data) + } + + gtk_label_set_markup (GTK_LABEL(label), text); +- gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip); ++ if (!pinentry->grab) ++ { ++ gtk_widget_set_tooltip_text (GTK_WIDGET(button), tooltip); ++ } + g_free (tooltip); + } + +@@ -736,7 +739,7 @@ create_window (pinentry_t ctx) + gtk_progress_bar_set_text (GTK_PROGRESS_BAR (qualitybar), + QUALITYBAR_EMPTY_TEXT); + gtk_progress_bar_set_fraction (GTK_PROGRESS_BAR (qualitybar), 0.0); +- if (pinentry->quality_bar_tt) ++ if (pinentry->quality_bar_tt && !pinentry->grab) + { + #if !GTK_CHECK_VERSION (2, 12, 0) + gtk_tooltips_set_tip (GTK_TOOLTIPS (tooltips), qualitybar, diff --git a/n/pinentry/pinentry.SlackBuild b/n/pinentry/pinentry.SlackBuild index 421bb221..1d9bf581 100755 --- a/n/pinentry/pinentry.SlackBuild +++ b/n/pinentry/pinentry.SlackBuild @@ -32,7 +32,7 @@ WGET=${WGET:-https://www.gnupg.org/ftp/gcrypt/pinentry/$ARCHIVE} # Build infos NAMEPKG=${NAMEPKG:-pinentry} -BUILD=${BUILD:-3GGD} +BUILD=${BUILD:-4GGD} ARCH=${ARCH:-$(uname -m | sed 's/^i.86$/i486/;s/^arm.*/arm/')} JOBS=${JOBS:-1} EXT=${EXT:-txz} @@ -86,6 +86,9 @@ cd $NAME # Apply fix for not-floating dialog windows # (https://dev.gnupg.org/T3253) patch -p 1 < $CWD/pinentry-1.0.0-gtk2-floating-dialog.patch +# Apply fix for grabbing issue with Gtk2 tooltips +# (https://dev.gnupg.org/T3297) +patch -p 1 < $CWD/pinentry-1.0.0-gtk2-disable-tooltips.patch CFLAGS=$CPUOPT \ CXXFLAGS=$CPUOPT \ ./configure \