gtk_window_set_position randomly doesnt work?



On gnome desktop when I run
gtk_window_set_position(GTK_WINDOW(window), GTK_WIN_POS_CENTER);
The window does not always center, instead it appears at the top left
of the desktop. This seems to happen almost randomly, I can run the
same program over and over and sometimes it centers sometimes it
doesn't, but on winNT systems I never see this behaviour.

My usual order of setting up a window is this:
gtk_window_new
gtk_window_set_title
gtk_window_set_position
pack containers etc.
g_signal_connect's
gtk_widget_show window

I guessed that I should not set position until just before calling
gtk_widget_show, but I tried this and still get the wierd results on
gnome, while the winNT windows always center.

Any ideas?



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