Re: fvwm starts when other window manager is already activeOrganization: Manoj Srivastava's Home

2006-01-28 Thread Bernhard R. Link
* Viktor Griph [EMAIL PROTECTED] [060128 16:48]:
 Well, I really don't know about that. thinking about it the only x-server 
 I'm certain it has worked with is a version of Xsun on solaris 2.8. 
 Looking at the fvwm code I believe it might be that an XSync has been 
 changed to an XFlush in the startup code before changing the errorhandler 
 from the one that traps running WMs to the normal fvwm error handler. But 
 since I'm not sure exactly how this WM-trapping is supposed to work I 
 leave to someone else to decide if changing it back to XSync is correct.

I really think that is the problem (XSync vs XFlush).

Looking into the libX11 code XFlush only writes all pending things
to the X-server. Unless writing more would block[1] it does not read
anything. Thus it cannot receive any Error notification from the
server thus CatchRedirectError is never called.

When I replace the XFlush with an XSync, the message from the
CatchRedirectError handler is shown and fvwm termiantes correctly
if any other window manager is running.

Changing XSync back to XFlush and adding some diagnostics to
FvwmErrorHandler I see it receiving a BadAccess(10) Error for
a X_ChangeWindowAttributes(2) request.

And XSelectInput simply sends a ChangeWindowAttributes request
for the specified window and EXEVMASK_ROOTW contains
SubstructureRedirectMask (which fits to the name of the
CatchRedirectError handler) and xspec/proto.txt tells:

| Multiple clients can select input on the same window; their
| event-masks are disjoint.  When an event is generated, it
| will be reported to all interested clients.  However, only
| one client at a time can select for SubstructureRedirect,
| only one client at a time can select for ResizeRedirect, and
| only one client at a time can select for ButtonPress.  An
| attempt to violate these restrictions results in an Access
| error.

Hochachtungsvoll,
Bernhard R. Link

[1] This could be the cause of it working earlier or under different
operating systems, the buffers for unix sockets or tcp connections
might have increased.



Re: fvwm starts when other window manager is already activeOrganization: Manoj Srivastava's Home

2006-01-28 Thread Bernhard R. Link
* Viktor Griph [EMAIL PROTECTED] [060128 14:36]:
 I've done some tests and belive that this bug is due to a change in X with 
 XOrg 6.8. I've tested fvwm 2.5.16, 2.5.10 and 2.5.4 from the 2.5.x branch, 
 and all have the bug. However I'm sure that the bug was not present when I 
 used 2.5.4 (and probably not 2.5.10) actively. Thus it must be something 
 else that has changed since then. The bug is however not present in 
 2.4.19, so it must be soemthing that has changed in the early 2.5.x 
 versions, which I weren't able to compile now.

I'm seeing the bug here with the Debian sarge version of XFree86 namely
4.3.0.dfsg.1-14sarge1. I do not know if it contain any patches taken
from Xorg, though. 

Hochachtungsvoll,
Bernhard R. Link