Re: Window Frame Size



Alan LaViolette <alan globalfoo net> writes:
> I am working on positioning of a window that I want to control exactly
> to location it show up on the screen.  To do this I need the frame
> size, and I can not get this.

It is impossible to get the frame size before the window is onscreen
using X. There is no way GTK could implement it. So you are going to
need to find another way to write your program.

See here for why:
  http://developer.gnome.org/doc/API/2.0/gtk/gtk-x11.html#GTK-X11-ARCH

>  I have looked at the function
> gtk_window_get_frame_size in the current gtk+ CVS. 

If you mean get_frame_dimensions, the docs for that function explain
why it didn't work.

You might want to read the gtk_window_move() docs:
  http://developer.gnome.org/doc/API/2.0/gtk/gtkwindow.html#GTK-WINDOW-MOVE
  http://developer.gnome.org/doc/API/2.0/gtk/gtkwindow.html#GTK-WINDOW-SET-GRAVITY

These explain how to align a window against another point on the
screen, without knowing the frame size.

Havoc



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