I have the same problem (can'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 <
<a href="mailto:cn@sueste.net">cn@sueste.net</a>>:</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>> Erik Blankinship wrote:
<br>><br>>> Let me explain what I am trying to achieve: I am creating a "picture in<br>>> a picture effect" (using XV in a window, amongst other windows). GTK<br>>> doesn't play well with overlapping widgets, and
gtk.Fixed() doesn't<br>>> guarantee Z-order. So I am using a stack of gtk.Windows without<br>>> decoration to achieve the desired effect, but the appearance is that<br>>> everything looks like a nice gtk layout.
<br>>><br>><br>> Sorry, got confused by your description; I thought you were trying to<br>> change stacking on the fly by swapping transient-fors around.<br>><br>> But anyway, you still have the problem that "transient for" doesn't
<br>> actually mean anything having to do with stacking. (In fact, the ICCCM<br>> lists a bunch of things a window manager might do differently with<br>> transient windows, but stacking order isn't one of them.) So (1) setting
<br>> transient-for on a window won't necessarily affect its stacking, and (2)<br>> it may affect it in ways other than stacking. (Eg, matchbox appears to<br>> assume that any window that has WM_TRANSIENT_FOR set is a dialog box.)
<br>><br>> So your best bet is probably to make your own version of gtk.Fixed that<br>> does have a guaranteed Z-order, rather than trying to bend the wm to<br>> your will.<br>><br>> Marco says "I seem to remember blizzard wrote something like that for
<br>> mozilla gtk2". You *might* also be able to get gtk.Fixed to work just by<br>> calling raise()/lower() on the child widgets' GdkWindows to stack them<br>> the way you want within the Fixed. (Or just by being sure to show() them
<br>> in bottom-to-top order.)<br>><br>> -- Dan<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>><br>><br><br>I hate to be the guy that starts the "I need that too" thread, but,<br>well, I could use Fixed with zorder...
<br><br>In an activity I'm developing, Jigsaw (you can check it out, it's on<br>olpc's git) I use Fixed to manage the jigsaw pieces. Now, this presents<br>a lot more work for the machine than the 'Draw your canvas' 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'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't that hard... I just
<br>don'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>