13
0

fix meterbridge window pos+size state save

...even if window is not open when session is closed.
This commit is contained in:
Robin Gareus 2013-07-09 19:48:15 +02:00
parent 56f4341ade
commit c675942fb3

View File

@ -471,15 +471,14 @@ Meterbridge::set_state (const XMLNode& node)
XMLNode&
Meterbridge::get_state (void)
{
char buf[32];
XMLNode* node = new XMLNode ("Meterbridge");
if (is_realized()) {
Glib::RefPtr<Gdk::Window> win = get_window();
if (is_realized() && _visible) {
get_window_pos_and_size ();
}
XMLNode* geometry = new XMLNode ("geometry");
char buf[32];
snprintf(buf, sizeof(buf), "%d", m_width);
geometry->add_property(X_("x_size"), string(buf));
snprintf(buf, sizeof(buf), "%d", m_height);
@ -489,7 +488,6 @@ Meterbridge::get_state (void)
snprintf(buf, sizeof(buf), "%d", m_root_y);
geometry->add_property(X_("y_pos"), string(buf));
node->add_child_nocopy (*geometry);
}
node->add_property ("show-meterbridge", _visible ? "yes" : "no");
return *node;