On Sat, Jun 18, 2016 at 01:59:17AM +0200 I heard the voice of
Rhialto, and lo! it spake thus:
> 
> I agree that that `if' there is kind of suspicious. Menu windows get
> created as children of Scr->Root already.

Yeah.  The Captive stuff is all a little...  odd.  I wonder whether
it's worth keeping around.  I s'pose it's theoretically useful for
testing configs, and even more theoretically for dev, but using Xnest
or Xephyr or the like probably does everything better for the latter,
and maybe the former as well (and how many people try either?)  And it
seems to have more than a few rough edges, even discounting cases like
this where its interference seems a bit dubious.


> Maybe Scr->Root changes when "virtual screens" are involved (it has
> been a while, I'd need to recheck that)

I don't think so.  As far as I can see, Root is set during startup,
and that's the end of it.

Of course, it would differ across different X Screen's, since Scr
itself would change.  But menus are local to a single Screen anyway,
so it would be a whole different set that are already on that Root!


> The manual page I have doesn't say it isn't allowed to reparent a
> window to the parent it already has. But it also doesn't say that in
> that case the move to (x,y) happens. It is imaginable that an X
> server might simply do nothing (not even the move) if the parent
> doesn't change.

Yeah, the Xlib func is in this case just a thin wrapper around the
ReparentWindow protocol request[0].  Which at least _implies_ that the
move should happen regardless, though I guess it's _possible_ to read
it otherwise.  I think it'd be a stupid reading, but even so, wouldn't
rule out the possibility of bugs.  Compare XMove(), which sends a
ConfigureWindow request[1]; the semantics of the values are phrased
the same.

Still.  No reason to Reparent if we don't have to, and I'm
increasingly believing we don't have to...



[0] 
https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:ReparentWindow

[1] 
https://www.x.org/releases/X11R7.7/doc/xproto/x11protocol.html#requests:ConfigureWindow


-- 
Matthew Fuller     (MF4839)   |  [email protected]
Systems/Network Administrator |  http://www.over-yonder.net/~fullermd/
           On the Internet, nobody can hear you scream.

Reply via email to