Re: A simple question.



On Sat, Aug 05, 2000 at 01:36:41PM +0200, Patrick Mariescurrena wrote:

> I'm writing my first modest gtk application, and I would like to
> position the main window in a specific (50,50) coordinate. I'm using :
> gtk_widget_set_uposition(GTK_WIDGET(window), 50, 50); however, the
> window is always drawn in the same place it was last time you closed it.
> 
> Is this a bug or am I doing something wrong?

If you really want to specify a fixed position, the set_uposition
routine is the way to do it.  However, from a usability perspective,
the whole idea of having an application specify its own position, if
not exactly wrong, is certainly not the generally recommended approach.

Positioning top-level windows is a job best left to the window
manager.  The set_uposition call only provides a hint -- a
recommendation -- regarding the window's position to the window
manager.  The window's actual position is determined by the window
manager.

Some window managers provide an option to ignore this hint, which if
set would cause the results that you report.  For example, if you're
using sawfish as your WM, go to the Customize -> Placement control
panel, and see if the "Ignore program-specified window placements"
option is set.

-- John Kodis.




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