RE: The Window expose-event with gtk_window_resize() problem:



When I use the gdk_window_resize(), this program works fine.
It got to be something with the gtk_window_resize;
Check the source code for gtk_window_resize, it calls the function
          gtk_widget_queue_resize (widget);

the source code for       gtk_widget_queue_resize (widget) is;
//--------------------
void
gtk_widget_queue_resize (GtkWidget *widget)
{
  g_return_if_fail (GTK_IS_WIDGET (widget));

  if (GTK_WIDGET_REALIZED (widget))
    gtk_widget_queue_shallow_draw (widget);
      
  _gtk_size_group_queue_resize (widget);
}
//--------------------
because there is a gtk_widget_queue_shallow_draw, so it draw twice.

When I use the gtk_window_resize, the expose event got executed twice.
This may be a bug?!

Thanks.
Tom.



-----Original Message-----
From: gtk-app-devel-list-bounces gnome org [mailto:gtk-app-devel-list-
bounces gnome org] On Behalf Of Tom Liu
Sent: Friday, July 02, 2004 2:53 PM
To: gtk-app-devel-list gnome org
Subject: The Window expose-event with gtk_window_resize() problem:

Hi,
      The following program is very simple, just draw a rectangle on
the GtkWindow. But it give me problems, It draw 2 lines when I use
gtk_window_resize function.
      Following program when I click mouse button, it show 2 lines.

      Thanks.
Tom.





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