Re: CVS commit 1.189 (Owen) and gtk_window_set_has_frame



On Mon, Feb 28, 2005 at 08:41:26AM +0100, Stephane Raimbault wrote:
> Yes I know but my app works in production use without window manager and
> dialog windows show important messages.

gtk_window_set_has_frame is called for you when gtk is built with the
framebuffer backend, so there is no need to call it explicitly. Simply
remove the call. (The call to gtk_window_set_frame_dimensions is fine,
it'll simply be a noop on X11).

-Yosh
> 
> Warning message :
> 
> (ui:4430): Gdk-CRITICAL **: gdk_window_set_icon: assertion
> `GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD' failed
> 
> Bye
> 
> Stephane
> 
> > On Fri, 25 Feb 2005 11:32:15 +0100, Stephane Raimbault wrote:
> > > Hi,
> > > 
> > > I previously did a report about this problem (august 04).
> > > 
> > > The gtk+'s commit 1.189 (between GTK+ 2.2 and 2.4) introduced a new
> > > check in gdk/x11/gdkwindow-x11.c -> gdk_window_set_icon() :
> > > 
> > > g_return_if_fail (GDK_WINDOW_TYPE (window) != GDK_WINDOW_CHILD);
> > > 
> > > Now this simple code shows a warning :
> > > dialog = gtk_message_dialog_new (window,
> > >                                  GTK_DIALOG_MODAL,
> > >                                  GTK_MESSAGE_QUESTION,
> > >                                  GTK_BUTTONS_CANCEL,
> > >                                  "Do you want something ?");
> > > 
> > > gtk_dialog_add_button (GTK_DIALOG (dialog),
> > >                        GTK_STOCK_QUIT,
> > >                        GTK_RESPONSE_ACCEPT);
> > > gtk_window_set_has_frame (GTK_WINDOW (dialog), TRUE);
> > > gtk_window_set_frame_dimensions (GTK_WINDOW(dialog),
> > >                                  6, 6, 6, 6);
> > 
> > Why are you calling the window frame API on X11? As the docs say, it's
> > pretty much meant for the framebuffer backend only.
> > 
> > -Yosh
> 
> 
> 



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