gtkmm and save/restore window positions
- From: Johann Horvat <horvat johann gmx net>
- To: gtk-list gnome org
- Subject: gtkmm and save/restore window positions
- Date: Sat, 07 Oct 2006 20:54:45 +0200
Hello!
I don't know if this is the right mailing list to ask my question...
Does anyone can tell me how to save and restore window positions with
gtkmm 2.4.
I found get_geometry:
http://www.gtkmm.org/docs/gtkmm-2.4/docs/reference/html/classGdk_1_1Window.html#6833d29726c3d995c39b74310d21326e
Here's a code fragment
WindowMain::~WindowMain(){
int x, y, w, h, d;
Glib::RefPtr<Gdk::Window> window=get_window();
window->get_geometry(x, y, w, h, d);
std::cout<<"x="<<(guint)x<<" y="<<(guint)y<<std::endl;
}
Sometimes (nearly every third time) I execute this code, it works
(gives the coordinates), most of the time I get a
x=4 y=23
The linik above says something about gdk_window_get_position, but I
don't know how to use it...
Thanks
Johann
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]