The following part of the patch introduces an unintended fallthrough in a case statement: @@ -359,7 +376,8 @@ keypress(XKeyEvent *ev) { case XK_Return: case XK_KP_Enter: puts((sel && !(ev->state & ShiftMask)) ? sel->text : text); - exit(EXIT_SUCCESS); + ret = EXIT_SUCCESS; + running = False; case XK_Right: This means that everytime the user selects an entry, instead of exiting right away, dmenu selects the next entry (behaviour of XK_Right), redraws and exits immediately afterwards. Normally, one wouldn't notice the last redraw because the time is too short, but compositing managers such as compton have a fade-out effect that takes the last image of a closed window and fade it out slowly. Which means that you get to see the wrongly selected entry. Reproducible: Always Steps to Reproduce: 1. Install and start compton 2. Open dmenu with a list of entries and select the first one with Return Actual Results: The next entry is selected, the menu fades away and the original entry is returned on stdout. Expected Results: The current entry should stay selected during fade-out
Created attachment 368432 [details, diff] New version of the xft-patch Patch to add "break" statements to prevent case-fallthroughs
Created attachment 368434 [details, diff] Diff to original gentoo xft patch
This is a more or less "upstream" patch (see URL). Did you point this out to the authors of that patch yet?
I can't really test this myself as I use a window manager that does not keeps images of windows around and immediately destroys them instead. The patch went into -r4 whereas -r3 still uses the old patch - let's keep this bug report open for a while so people can see where to complain.
Thanks for the fast response. I sent the patch to the suckless.org list: http://lists.suckless.org/dev/1401/19703.html Note, that gentoo still differs from the upstream patch, because the patch from bug #470812 never got sent upstream.
(In reply to Hans-Peter Deifel from comment #5) > Note, that gentoo still differs from the upstream patch, because the patch > from bug #470812 never got sent upstream. I never got a user response on that and no further bug reports either.
4.6 is going stable and has Xft support built in.