Problem setting window position



I'm having problems getting GTK applications to open their windows at
particular positions on the display. gtk_widget_set_uposition is
ignored in some cases.

In particular, adding the line:

	gtk_widget_set_uposition(window, 0,0);

immediately before the

	gtk_widget_show (window);

in 'helloworld.c' from the examples, does nothing. (gtk_widget_set_usize
works fine...) Trying it after the gtk_widget_show, and before gtk_main,
results in me still having to position the initial window with the mouse,
but the window then jumps to the position indicated in the call to
gtk_widget_set_uposition. (As does adding another 'gtk_widget_show' on the
window anywhere earlier in the code.)

This problem arises in real world applications as well as in the small
test examples - notably, for me, jpilot (www.jpilot.org).

Other non-gtk+ X programs are able to specify initial positions on
startup without problem.

I'm using gtk+ version 1.2.6, compiled from source, on my Redhat 5.2
Linux box, with kernel 2.2.17. Problem stays the same with gcc 2.7.2.3
or 2.95.2. Window manager is twm. 'X -showconfig' gives:

	Metro Link, Inc Version 4.1.0/ X Window System
	(protocol Version 11, revision 0, vendor release 6300)
	Operating System: Linux 2.0.31 i586 [ELF] 
	Configured drivers:

(The system used to be Redhat 5.0, but was upgraded to 5.2, and I
don't think the Metro Link X was changed by the upgrade...)

Any help appreciated!

Cheers

Colin

----------------------------------------------------------------------
Colin Brough                               Colin Brough btinternet com




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