Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 201951

Summary: patch pinentry-0.7.2-grab.patch breaks app-crypt/pinentry 0.7.3 when using compiz
Product: Gentoo Linux Reporter: Giacomo Perale <ghepeu>
Component: Current packagesAssignee: Sven Wegener <swegener>
Status: RESOLVED FIXED    
Severity: normal CC: crypto+disabled, gentoo, griffon26, hanno
Priority: High    
Version: 2007.0   
Hardware: x86   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: pinentry-0.7.4-grab.patch

Description Giacomo Perale 2007-12-11 14:37:11 UTC
The patch pinentry-0.7.2-grab.patch works reliably with pinentry 0.7.3 and metacity but breaks pinentry when using compiz 0.6.2. 
The passphrase is accepted when I use the [Enter] key but if I click on the OK button pinentry crashes.
Commenting out the relevant epatch line from the ebuild and rebulding pinentry fixes this problem.

Reproducible: Always
Comment 1 Giacomo Perale 2007-12-20 23:19:13 UTC
The same's true for pinentry 0.7.4.
Comment 2 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-21 06:47:38 UTC
Any clue what the difference is?
Comment 3 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-21 23:29:30 UTC
This is following bug#165493.

I am no gtk+ developer... I tried to play with these events...

map-event is issued too early for some users... So grab does not work.
expose-event is issued too many times during session, so it may cause the behavior we see here.

I tried to add gdk_event_get_graphics_expose() at the map-expose event handler, but then it stacked.

I tried to see if there is another event happening after map-event, and found focus-in-event that already used if nograb is used.

I don't really understand the function of the map-event here...
Comment 4 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-21 23:32:29 UTC
Created attachment 139069 [details, diff]
pinentry-0.7.4-grab.patch

I think this patch is "good enough", it handles focus-in/focus-out-event and grab the keyboard if requested.

The extra protection of early grab set is dropped... But if it works, I think it will do.

Can you all check if it works?
Comment 5 Maurice van der Pot (RETIRED) gentoo-dev 2007-12-22 01:07:03 UTC
This patch works perfectly for me.

It turns out that with the previous patch pinentry crashed for me as well when clicking OK. I only tested with the enter key before. 

I'm not running compiz though and disabling the composite extension did not make a difference.
Comment 6 Alon Bar-Lev (RETIRED) gentoo-dev 2007-12-22 05:21:16 UTC
OK.
Closing this.
If someone has a better solution please reopen.