Re: Saving window position
- From: jcupitt gmail com
- To: Gorshkov <listsubscriptions oghma on ca>
- Cc: John Franklin <john lesberries co uk>, GTK developer list <gtk-app-devel-list gnome org>
- Subject: Re: Saving window position
- Date: Tue, 11 Mar 2008 10:37:40 +0000
On 11/03/2008, Gorshkov <listsubscriptions oghma on ca> wrote:
to set the window position/size:
gtk_window_move(window, x, y);
gtk_window_set_default_size(window, width, height);
I thought of another point to bear in mind: some window managers
become unhappy if you set a size larger than the screen. It's a good
idea to clip the size against the known scrren size:
GdkScreen *screen = gtk_widget_get_screen( GTK_WIDGET( iwnd ) );
gtk_window_set_default_size( GTK_WINDOW( iwnd ),
IM_MIN( width, gdk_screen_get_width( screen ) ),
IM_MIN( height, gdk_screen_get_height( screen ) ) );
John
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]