Re: How to manage a window flowing over another?
- From: "Bluez Zhao" <zhyforever 163 net>
- To: "Havoc Pennington" <hp redhat com>
- Cc: "gtk-list" <gtk-list gnome org>
- Subject: Re: How to manage a window flowing over another?
- Date: Fri, 27 Oct 2000 09:15:55 +0800
At first, I should express my thank to Havoc Pennington. This is the second
time you help me. Thanks.
Yes, I should use GTK_WINDOW_DIALOG as the first window, and set the second
one transient for it. What is important is to realize the first one before I
use gdk_window_set_decorations. Or, it will give us a warning as "assert on
`window!=NULL` failed".
But I want to know WHEN should I realize a widget? I seldom realize a
widget. Of course it give me many warnings when it runs in return.
----- Original Message -----
From: "Havoc Pennington" <hp redhat com>
To: "Bluez Zhao" <zhyforever 163 net>
Cc: "gtk-list" <gtk-list gnome org>
Sent: Thursday, October 26, 2000 10:14 PM
Subject: Re: How to manage a window flowing over another?
>
> "Bluez Zhao" <zhyforever 163 net> writes:
> > I create the two windows use gtk_window_new(). If I set the first one as
> > GTK_WINDOW_POPUP, then the second can't be set as transient for it. If I
set
> > the second one as GTK_WINDOW_POPUP, it can be set transient but it can't
be
> > moved. What should I do?
> >
>
> Don't use GTK_WINDOW_POPUP. Just turn off decorations with
> gdk_window_set_decorations().
>
> > And another question, there are many times I need to use an GdkWindow as
> > argument, but I create the widget as a GtkWidget, if I use
widget->window, it
> > often gives warnings and fails when it's run. How can I know if a
GtkWidget
> > has a GdkWindow?
> >
>
> It has a GdkWindow after it's a realized. A window will be realized
> when a) it's shown b) its container and its parents are shown c) one
> of the containers it's inside is a toplevel window.
>
> (Simple solution: if you need a window to be realized, do whatever
> task you want to do in a signal handler connected to "realize" with
> connect_after().)
>
> Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]