Re: tmpwm fix?

"Bernhard R. Link" <[email protected]>
Newsgroups gmane.comp.window-managers.ratpoison.devel
Message-ID <[email protected]>
* Shawn <[email protected]> [081101 18:36]:
> Can anyone who's had a problem with tmpwm pull the latest git and give
> it a go? I think it may be fixed or at least more stable than ever before.

There seem to be multiple fail modes. Sadly I currently (with the old
version) can only reproduce the one about ratpoison exiting when the
tmpwm returned to fast. The one where the prefix key fails I cannot, so
I cannot say whether it is fixed.

But the problem with ratpoison sometimes exiting because the X server
thinking there is still another window manager seems to be fixed. I
sometimes get quite a long time where it waits in that loop. I think
this is because the X server is so occupied telling ratpoison there is
still another window manager, that it does not find the time to look
for lost clients, especially for a window manager that was killed which
actually caused ratpoison to ask this question.

The following patch fixes this for me (at least as sure I can say from
not seing it again in a few dozens trys while it usually happens for
about 3 out of 4 tries without[1]):

diff --git a/src/actions.c b/src/actions.c
index 136d114..f23bd33 100644
--- a/src/actions.c
+++ b/src/actions.c
@@ -4677,6 +4677,8 @@ cmd_tmpwm (int interactive, struct cmdarg **args)
                      | SubstructureRedirectMask | SubstructureNotifyMask
                      | StructureNotifyMask);
         XSync (dpy, False);
+	if (tmpwm_error_raised)
+	   sleep(1);
       }
   } while (tmpwm_error_raised);
   XSetErrorHandler (old_handler);


Hochachtungsvoll,
	Bernhard R. Link

[1] Did I already mention that I hate race conditions?
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.