[9761] in The GTK GIMP ToolKit mailing list archive

home help back first fref pref prev next nref lref last post

[gtk-list] Re: please heeeeeeeelpp: gtk_window_position (.., GTK_WIN_POS_CENTER);

daemon@ATHENA.MIT.EDU (Owen Taylor)
Mon Nov 2 12:23:57 1998

To: gtk-list@redhat.com
Cc: devious@verinet.com
From: Owen Taylor <otaylor@redhat.com>
Date: 02 Nov 1998 12:23:37 -0500
In-Reply-To: Adam Kopacz's message of "Sun, 1 Nov 1998 16:45:58 +0100"
Resent-From: gtk-list@redhat.com
Reply-To: gtk-list@redhat.com


Adam Kopacz <adam.k@idnet.de> writes:

> hi,
> 
> i search since some weeks a call for a GDK app (quick image viewer) that
> makes something like:
>   gtk_window_position  (GTK_WINDOW(window), GTK_WIN_POS_CENTER);
> without a showed window..
>
> in gdk this works fine:
>   gdk_window_move(win,(screen_x - org_w) / 2, (screen_y - org_h) / 2);
> but i must call 
>   gdk_window_show(win); 
> first, and this looks ugly becouse the user see a quick-jumping window :(

Well if you use a GtkWindow GTK+ can take care of getting things right
for you.

But, in this case, I believe you need to set the window manager hints
to indicate that the window manager should obey the requested position
- you would do this by calling gdk_window_set_hints().

Regards,
                                        Owen

-- 
To unsubscribe: mail -s unsubscribe gtk-list-request@redhat.com < /dev/null


home help back first fref pref prev next nref lref last post