Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37569223
en ru br
ALT Linux repos
S:1.2.1-alt1
5.0: 0.7.5-alt3
4.1: 0.7.4-alt2
4.0: 0.7.4-alt2
3.0: 0.7.2-alt1

Group :: File tools
RPM: pinentry

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: 0003-pinentry-gtk-x11-race.patch
Download


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",
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin