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

Re: Positioning....



On Thu, 26 Aug 1999, Olivier Deme wrote:

> > What is the simplest way to position my main window on the screen before
> > it
> > opens (or right after)?
> 
> I am using:
> 
> gtk_window_position(GTK_WINDOW(window),GTK_WIN_POS_CENTER)
> 
> although this doesn't seem to garantee that the window will be placed at
> the center of the screen all the time.
> I think the window manager has the last word about that.
> Can someone confirm?

As far as I know this one puts the top left corner of the window in the
screen center instead of actually centering the whole window.

To actually center a window use gdk_screen_width() and gdk_screen_height()
to get screen size and use these values to calculate the correct top-left
corner position.

.........................................................................
Felipe Paulo Guazzi Bergo  -  guazzibe@dcc.unicamp.br
Undergraduate in Computer Engineering - Unicamp - Campinas - SP - Brazil
  



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