I have the same problem (can&#39;t set z-order, picking a piece) using hippo-canvas.<br>I think this a common problem for a lot of applications.<br><br>Gonzalo<br><br><div><span class="gmail_quote">2007/8/27, Carlos Neves &lt;
<a href="mailto:cn@sueste.net">cn@sueste.net</a>&gt;:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">Dan Winship wrote:<br>&gt; Erik Blankinship wrote:
<br>&gt;<br>&gt;&gt; Let me explain what I am trying to achieve: I am creating a &quot;picture in<br>&gt;&gt; a picture effect&quot; (using XV in a window, amongst other windows).&nbsp;&nbsp;GTK<br>&gt;&gt; doesn&#39;t play well with overlapping widgets, and 
gtk.Fixed() doesn&#39;t<br>&gt;&gt; guarantee Z-order.&nbsp;&nbsp;So I am using a stack of gtk.Windows without<br>&gt;&gt; decoration to achieve the desired effect, but the appearance is that<br>&gt;&gt; everything looks like a nice gtk layout.
<br>&gt;&gt;<br>&gt;<br>&gt; Sorry, got confused by your description; I thought you were trying to<br>&gt; change stacking on the fly by swapping transient-fors around.<br>&gt;<br>&gt; But anyway, you still have the problem that &quot;transient for&quot; doesn&#39;t
<br>&gt; actually mean anything having to do with stacking. (In fact, the ICCCM<br>&gt; lists a bunch of things a window manager might do differently with<br>&gt; transient windows, but stacking order isn&#39;t one of them.) So (1) setting
<br>&gt; transient-for on a window won&#39;t necessarily affect its stacking, and (2)<br>&gt; it may affect it in ways other than stacking. (Eg, matchbox appears to<br>&gt; assume that any window that has WM_TRANSIENT_FOR set is a dialog box.)
<br>&gt;<br>&gt; So your best bet is probably to make your own version of gtk.Fixed that<br>&gt; does have a guaranteed Z-order, rather than trying to bend the wm to<br>&gt; your will.<br>&gt;<br>&gt; Marco says &quot;I seem to remember blizzard wrote something like that for
<br>&gt; mozilla gtk2&quot;. You *might* also be able to get gtk.Fixed to work just by<br>&gt; calling raise()/lower() on the child widgets&#39; GdkWindows to stack them<br>&gt; the way you want within the Fixed. (Or just by being sure to show() them
<br>&gt; in bottom-to-top order.)<br>&gt;<br>&gt; -- Dan<br>&gt; _______________________________________________<br>&gt; Sugar mailing list<br>&gt; <a href="mailto:Sugar@lists.laptop.org">Sugar@lists.laptop.org</a><br>&gt; 
<a href="http://lists.laptop.org/listinfo/sugar">http://lists.laptop.org/listinfo/sugar</a><br>&gt;<br>&gt;<br><br>I hate to be the guy that starts the &quot;I need that too&quot; thread, but,<br>well, I could use Fixed with zorder...
<br><br>In an activity I&#39;m developing, Jigsaw (you can check it out, it&#39;s on<br>olpc&#39;s git) I use Fixed to manage the jigsaw pieces. Now, this presents<br>a lot more work for the machine than the &#39;Draw your canvas&#39; approach,
<br>but also makes the code 1000 times simpler to to and manage.<br><br>But I needed to move the piece being picked up to front, and the only<br>way I could do this, short of writing my own Fixed version, was to<br>unparent and readd the piece to the container. This has some side
<br>effects, made the dragging fail so I ended up doing that on piece<br>release (looks funny sometimes but it works).<br><br>Of course this is only good to move the widget to the very top of the<br>stack, you can&#39;t really set a specific position in the z axis...
<br><br>I guess that cloning and extending gtk.Fixed should not be too hard, I<br>just never got around to do it. I did a lot of specialized window<br>managers in Java in the past, and it really wasn&#39;t that hard... I just
<br>don&#39;t have the time right now to take a go at this (and that is a good<br>thing :) )<br><br>Just my 5 euro cents.<br><br>---<br><br>Carlos Neves<br><br>_______________________________________________<br>Sugar mailing list
<br><a href="mailto:Sugar@lists.laptop.org">Sugar@lists.laptop.org</a><br><a href="http://lists.laptop.org/listinfo/sugar">http://lists.laptop.org/listinfo/sugar</a><br></blockquote></div><br>