WAN Hing Wah <[EMAIL PROTECTED]> writes:
> although it work,I want to let user change to window position by draging
> the title bar using window manager's feature,but after user have moved
> the windows,a call to gtk_widget_hide() and then gtk_widget_show again
> make the windows appear again at the position which
> gtk_widget_set_uposition() is set..How can I maintain the current window
> position set by the user?
It's possible that simply unsetting the uposition will work. To unset
the uposition try setting it to -1, -1 (although either this or
set_usize() was broken for -1, -1, I don't remember). The window
manager may then remember the old position.
If that fails, you can get the current position with
gdk_window_get_origin() (or gdk_window_get_deskrelative_origin() or
gdk_window_get_root_origin(), I can honestly never remember which one
is correct), Note that these functions operate on widget->window
(GdkWindow) not on the GtkWindow.
Then you can reset the uposition based on that.
Havoc
_______________________________________________
gtk-list mailing list
[EMAIL PROTECTED]
http://mail.gnome.org/mailman/listinfo/gtk-list