[gtk-list] A couple of questions about widget positions answered



After some hacking around, I've managed to answer both of the questions
in my previous email.

For those interested in the same question, the answers are as follows:

1. The position of any widget (including top-level windows) can be
queried before widget realization by using gtk_object_getv and the
"x" and "y" args of the widget.

2. Using the method above also solves my problem regarding the position
of a top-level shell which takes into account window decorations.
I.e. if I place a top-level window at 0,0 on the screen, such that the
top left corner of the window manager decorations are at 0,0, then:
gdk_window_get_deskrelative_origin() answers (1,27), which will depend on
 your window manager, but querying the "x" and "y" values of the window
returns (0,0), which is what I was after in this case.

Sometimes the best way to get a question answered is to ask it in public,
since the answers to a great number of them are figured out by ones self
shortly after posting. :-)

james



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