Re: Showing a window behind others?



On Fri, 2003-03-14 at 07:53, martyn 2 russell bt com wrote:
> Is there a way to do this?
> I have looked at GtkWidget, GtkWindow and GdkWindow manual pages online.  I
> have tried a combination of using gdk_window_raise() and gdk_window_lower()
> but have not been successfull.  I also attempted using
> gdk_window_show_unraised().
> 
> This is what I am trying to do...
> 
> Window 1 - connection status.
> Window 2 - main window.
> 
> Window 1 shows first to report a problem.
> Window 2 shows second (on top)
> 
> I want to show Window 2 behind Window 1.  I can do this with
> gtk_window_set_transient() BUT, at the time I load Window1, Window2 is not
> shown.  To do this, I would have to set a flag and call the transient
> function after Window 2 is shown.
> 
> Is there a way of doing this? If not, would it be feasable to have a
> function in Gtk or Gdk along the lines of gdk_window_show_behind(GdkWindow
> *window) which puts the window at the bottom of the z-order?

I think the transient-for relationship really does encode what you
want here.. the X model doesn't really allow the stacking order
of managed clients to be controlled at the level that you want 
here. Rather, clients are supposed to indicate the relationship
between their windows to the window manager and let the window
manager deal with stacking order.

Unfortunately, I don't think the ICCCM allows setting the transient for
hint for visible windows.

Perhaps there needs to be a WM-spec addition to allow apps to do this
if this is something that is commonly needed.

I might suggest just hiding your connection status window momentarily
when you show the main window.. it will flash and be a bit ugly,
but should be reliable.

Regards,
                                                Owen






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