Hi Bernhard, Axel Beckert wrote: > Please include the program compiled from that example in the package, > too, [...]
I suggest the following modification to sloppy.c which prevents a race-condition between sloppy and the window switch with C-t C-t by checking the frame id of the to be selected window with the until then selected frame. Additionally it suppresses the error messages "not enough arguments" if awk doesn't output something and therefore the select argument is missing (on purpose, as in that case it should not select anything): --- /usr/share/doc/ratpoison/examples/sloppy.c 2011-09-13 17:26:30.000000000 +0200 +++ sloppy.c 2011-11-22 00:03:44.000000000 +0100 @@ -90,7 +90,7 @@ /* A window was entered. select it. */ { char shell[256]; - snprintf (shell, 255, "$RATPOISON -c \"select `$RATPOISON -c 'windows %%i %%n' | grep '%ld' | awk '{print $2}'`\"", event.xcrossing.window); + snprintf (shell, 255, "$RATPOISON -c \"select $($RATPOISON -c 'windows %%i %%n %%f' | grep '%ld' | awk '$3 != '$($RATPOISON -c curframe)' && $3 != \"\" {print $2}')\" 2>/dev/null", event.xcrossing.window); //printf ("%s\n", shell); spawn (shell); wait (NULL); That way sloppy focus follows mouse works fine for me in ratpoison without any race-condition. (I suggest to propagate this patch to upstream, too.) Regards, Axel -- ,''`. | Axel Beckert <a...@debian.org>, http://people.debian.org/~abe/ : :' : | Debian Developer, ftp.ch.debian.org Admin `. `' | 1024D: F067 EA27 26B9 C3FC 1486 202E C09E 1D89 9593 0EDE `- | 4096R: 2517 B724 C5F6 CA99 5329 6E61 2FF9 CD59 6126 16B5 -- To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org