Re: Weird problem with type hint Dock and configure-event.



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 magiclouds 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?
--
çåååææè
åéåééäé




-- 
çåååææè
åéåééäé



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