Code simple like this could not work as expected.

#include <gtk/gtk.h>
#include <stdio.h>

static void destroy( GtkWidget *widget,
                     gpointer   data )
{
  gtk_main_quit ();
}

static gboolean configure (GtkWidget *widget,
                           GdkEventConfigure *event,
                           gpointer user_data)
{
  fprintf (stderr, "configure");
  return FALSE;
}

int main( int   argc,
          char *argv[] )
{
  GtkWidget *window;
  gtk_init (&argc, &argv);
  window = gtk_window_new (GTK_WINDOW_TOPLEVEL);
  gtk_window_set_type_hint (GTK_WINDOW (window), GDK_WINDOW_TYPE_HINT_DOCK);
  g_signal_connect (G_OBJECT (window), "destroy",
                    G_CALLBACK (destroy), NULL);
  g_signal_connect (G_OBJECT (window), "configure-event", G_CALLBACK
(configure), NULL);
  gtk_widget_show_all (window);
  gtk_main ();
  return 0;
}


On Wed, Apr 8, 2009 at 1:24 PM, Magicloud Magiclouds
<magicloud.magiclo...@gmail.com> wrote:
> Hi,
>  Recently, I found that, if I inherit Gtk::Window class, and set the
> type hint to dock in initialize, the configure-event could be
> triggered correctly. But, if I directly use Gtk::Window class, new it,
> set the type hint to dock, then the configure-event would not be
> triggered at all.
>  Why it works like this?
> --
> 竹密岂妨流水过
> 山高哪阻野云飞
>



-- 
竹密岂妨流水过
山高哪阻野云飞
_______________________________________________
gtk-app-devel-list mailing list
gtk-app-devel-list@gnome.org
http://mail.gnome.org/mailman/listinfo/gtk-app-devel-list

Reply via email to