diff --git a/0003-pinentry-gtk-x11-race.patch b/0003-pinentry-gtk-x11-race.patch new file mode 100644 index 0000000..252b0d9 --- /dev/null +++ b/0003-pinentry-gtk-x11-race.patch @@ -0,0 +1,17 @@ +diff --git a/gtk+-2/pinentry-gtk-2.c b/gtk+-2/pinentry-gtk-2.c +index 2bf920b..658161c 100644 +--- a/gtk+-2/pinentry-gtk-2.c ++++ b/gtk+-2/pinentry-gtk-2.c +@@ -305,9 +309,11 @@ create_window (int 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", GDK_VISIBILITY_NOTIFY_MASK | GDK_STRUCTURE_MASK, NULL); + + g_signal_connect (G_OBJECT (win), +- pinentry->grab ? "map-event" : "focus-in-event", ++ pinentry->grab ? "visibility-notify-event" : "focus-in-event", + G_CALLBACK (grab_keyboard), NULL); + g_signal_connect (G_OBJECT (win), + pinentry->grab ? "unmap-event" : "focus-out-event", diff --git a/0004-Fix-qt4-pinentry-window-created-in-the-background.patch b/0004-Fix-qt4-pinentry-window-created-in-the-background.patch new file mode 100644 index 0000000..d4bfa42 --- /dev/null +++ b/0004-Fix-qt4-pinentry-window-created-in-the-background.patch @@ -0,0 +1,25 @@ +From 0cc3dd71213687ccb5ec0a1866864558bf03260b Mon Sep 17 00:00:00 2001 +From: Stanislav Ochotnicky +Date: Fri, 7 May 2010 14:45:44 +0200 +Subject: [PATCH] Fix qt4 pinentry window created in the background + +This is probably just a workaround. Proper fix is being investigated. +--- + qt4/pinentrydialog.cpp | 1 - + 1 files changed, 0 insertions(+), 1 deletions(-) + +diff --git a/qt4/pinentrydialog.cpp b/qt4/pinentrydialog.cpp +index 8644136..6064ab9 100644 +--- a/qt4/pinentrydialog.cpp ++++ b/qt4/pinentrydialog.cpp +@@ -63,7 +63,6 @@ void raiseWindow( QWidget* w ) + SetForegroundWindowEx( w->winId() ); + #endif + w->raise(); +- w->activateWindow(); + } + + QPixmap icon( QStyle::StandardPixmap which ) +-- +1.6.6.1 + diff --git a/pinentry.spec b/pinentry.spec index dc5561e..3fdda3e 100644 --- a/pinentry.spec +++ b/pinentry.spec @@ -17,7 +17,7 @@ Name: pinentry Version: 0.8.0 -Release: 2%{?dist} +Release: 3%{?dist} Summary: Collection of simple PIN or passphrase entry dialogs Group: Applications/System @@ -33,6 +33,10 @@ Source10: pinentry-wrapper ## Backported patches from SVN Patch50: 0001-Fix-pinentry-gtk-2-SIGSEGV-when-unfocusing-with-g-ar.patch Patch51: 0002-Fix-sigabrt-on-fail-grab-r229.patch +Patch52: 0003-pinentry-gtk-x11-race.patch + +## Patches not yet in SVN +Patch53: 0004-Fix-qt4-pinentry-window-created-in-the-background.patch BuildRequires: gtk2-devel BuildRequires: libcap-devel @@ -100,6 +104,8 @@ Support for Qt4 is new, and a bit experimental. %patch50 -p1 -b .rhbug_520236 %patch51 -p0 -b .rhbug_585422 +%patch52 -p1 -b .rhbug_589998 +%patch53 -p1 -b .rhbug_589532 # hack around auto* madness, lack of proper support for moc %if %{?_enable_pinentry_qt4:1} @@ -190,6 +196,10 @@ fi %changelog +* Fri May 7 2010 Stanislav Ochotnicky - 0.8.0-3 +- Fix X11 even race with gtk (#589998) +- Fix qt4 problems with creating window in the background (#589532) + * Thu Apr 29 2010 Rex Dieter - 0.8.0-2 - -qt: build as qt4 version, and drop qt3 support (f13+ only)