Preserving window geometry and position between invocations



Hello,

I'd like to preserve window position and size between invocations.

I can restore the size nicely using:

   Gtk::Window::set_default_size(width, height)

but I cannot seem to restore the position that nicely.  The only thing I
could get so far is this ugly hack:

void BuffyWindow::on_show()
{
	Gtk::Window::on_show();

	// Retrieve x and y from the configuration
	move(x, y);
}

However, this shows the window where the WM says it, then moves it where
I want it.  Besides not looking nice, I understand one should be more
cooperative with the WM.

What is the right way of doing this?


Ciao,

Enrico

--
GPG key: 1024D/797EBFAB 2000-12-05 Enrico Zini <enrico enricozini org>

Attachment: signature.asc
Description: Digital signature



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]