Need a synthetic ConfigureNotify clarification/extension in the spec (and I don't know what it should be)



Hi all,

Bradley Hughes filed http://bugzilla.gnome.org/show_bug.cgi?id=322840
about Metacity not sending a synthetic ConfigureNotify in response to
windows being mapped with either the PPosition or UPosition hints.  I
tried reading up further to see if we had missed any other places
where a ConfigureNotify should be sent, and found that while ICCCM
section 4.1.5 is clear about what should happen in response to
ConfigureRequest events (which we implement exactly), it does not
appear to specify what should happen for MapRequests and the EWMH
doesn't offer any relevant clarifications. In fact, since the ICCCM
doesn't appear to require any synthetic ConfigureNotify events in
response to MapRequests, it appears that Metacity's behavior is
correct.  Since Metacity's behavior causes bugs, though, we should
probably specify additional requirements for sending synthetic
ConfigureNotify events in the EWMH.

Now, it may be that there's another interpretation of the ICCCM under
which synthetic ConfigureNotify events are specified for MapRequest
events.  If so, though, I don't understand it.  But let me start by
addressing where such an interpretation would likely come from.
Section 4.1.5 of the ICCCM says:
  Client configure requests are interpreted by the window manager in
  the same manner as the initial window geometry mapped from the
  Withdrawn state, as described in section 4.1.2.3
I first read this as a one way implication rather than a two-way one
(i.e. that the rules for handling a MapRequest also apply to handling
ConfigureRequest, but not vice-versa).  However, even if it were a
two-way implication, the "as described in section 4.1.2.3" seems to
limit this to the handling of WM_NORMAL_HINTS like gravity (since
that's all that section 4.1.2.3 talks about).  This was the closest I
could find to a connection between ConfigureNotify events and
MapRequest events, so to me it appears that handling of synthetic
ConfigureNotifys for MapRequest events is undefined.

But, even if the synthetic ConfigureNotify stuff was supposed to apply
to MapRequest events when the window was transitioning from Withdrawn
state to Normal state, what would it mean?  It seems to be up to
interpretation as to whether the window or its border width has been
resized in such an action.  Similarly for moving and restacking.

Also, is a synthetic ConfigureNotify only needed if the application
sets PPosition or UPosition hints, or is one also needed even if those
hints are not set?  Modifying Bradley's test program that he attached
to the Metacity bug report, I noted that KWin sent synthetic
ConfigureNotify events whether or not UPosition hints were set, but I
also found that KWin sends synthetic ConfigureNotifys even when not
needed (marked with a big TODO in Client::configureRequestEvent).
blackbox and wmaker seemed similar, but again I don't know if they
just sent extra just to be sure like KWin or whether this case is
needed in the spec too.

So...thoughts?  Opinions?

Thanks,
Elijah



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]