- psppire_conf_set_int (conf, base, "x", event->x);
- psppire_conf_set_int (conf, base, "y", event->y);
+ maximized = (gdk_window_get_state (w) & GDK_WINDOW_STATE_MAXIMIZED) != 0;
+ psppire_conf_set_boolean (conf, base, "maximize", maximized);
+
+ if (!maximized)
+ {
+ gint width, height;
+ gint x, y;
+
+ gdk_drawable_get_size (w, &width, &height);
+ gdk_window_get_position (w, &x, &y);
+
+ psppire_conf_set_int (conf, base, "height", height);
+ psppire_conf_set_int (conf, base, "width", width);
+ psppire_conf_set_int (conf, base, "x", x);
+ psppire_conf_set_int (conf, base, "y", y);
+ }