[17898] in Athena Bugs

home help back first fref pref prev next nref lref last post

zwgc

daemon@ATHENA.MIT.EDU (Brad Thompson)
Mon Jun 12 21:55:47 2000

Message-Id: <200006130155.VAA05494@hodge-podge.mit.edu>
To: bugs@MIT.EDU
Date: Mon, 12 Jun 2000 21:55:38 -0400
From: Brad Thompson <yak@MIT.EDU>

This code is from zwgc/X_gram.c, and is called after zwgc maps a windowgram:

# if (reverse_stack && bottom_gram) {
#    XWindowChanges winchanges;
#
#    winchanges.sibling=bottom_gram->w;
#    winchanges.stack_mode=Below;
#    begin_xerror_trap (dpy);
#    XReconfigureWMWindow (dpy, w, DefaultScreen (dpy),
# 			   CWSibling|CWStackMode, &winchanges);
#    end_xerror_trap (dpy);
#    if (xerror_happened) {
#       /* The event didn't go.  Print an error message, and continue.  */
#       ERROR ("Error configuring window to the bottom of the stack.\n");
#    }
# }
# /* we always need to keep a linked list of windows */
# add_to_bottom(gram);

The XReconfigureWMWindow() call tries to configure the window.
This fails, because the window has been reparented.  It generates a
synthetic configure event targeted at the top-level window containing
the windowgram.  However, the sibling field of winchanges still has
bottom_gram->w, which is the previous windowgram window (which is not
top-level if using a reparenting window manager).  So, the reconfigure
fails because the windowgram cannot be placed below a non-top-level
window.  This causes reversestacking not to work on sawfish.

My analysis is suspect because if it were correct, reversestacking would
not work on reparenting window managers.  Maybe it is be a race condition?
Or I could just be thouroughly confused.

This problem has been observed on 8.3 Linux, 8.4 linux, 8.3 Solaris,
and 8.4 Solaris under sawfish 0.27.1 and the installed version of zwgc.
It only occurs when zwgc is launched before sawfish.

yak

home help back first fref pref prev next nref lref last post