Re: [gtk-list] setting position at startup



Michael Baumer wrote:
> 
> Hi
> 
> I try to save the position of my window when the app is closed and to
> reset it when the app is restarted.
> 
> when i exit i do
> 
> gdk_window_get_root_origin( GTK_WIDGET( data->window)->window,
>                                      &WindowX,
>                                      &WindowY );
> and save it somewhere
> 
> On startup i do
>         gtk_widget_set_uposition( app, WindowX, WindowY );
> 
> (a printf shows that the corrct values are used)
> 
> And on my Sun SparcStaion that works fine, but under Xfree on linux the
> position is more or less random.
> 
> Or is the problme the windowmanager? But that is the same on both machines
> (afterstep 1.6.10)
> 
> On a side note: Is there a standard way to use the xlib arguments
> (-geometry and such) ?
> 
> Greetings Michael
> 
> --
> To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


This code works on Solaris with KDE

/* */
	toplevel = gtk_window_new(GTK_WINDOW_TOPLEVEL);
	gtk_window_set_position(GTK_WINDOW(toplevel), GTK_WIN_POS_NONE);
	gtk_widget_set_uposition(toplevel, 500, 100);
/* */



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