Re: intercepting WM destroy signal
- From: "David Necas (Yeti)" <yeti physics muni cz>
- To: marcodev comcast net
- Cc: Gtk List <gtk-app-devel-list gnome org>
- Subject: Re: intercepting WM destroy signal
- Date: Thu, 17 Feb 2005 16:30:34 +0100
On Thu, Feb 17, 2005 at 03:16:44PM +0000, marcodev comcast net wrote:
In the GUI I'm developing I'd like to be able to save window information like size and placement when the
user exits the application. I have connected the top level window to the destroy signal and placed the
above mentioned functionality into the callback so it looks something like this:
...
The problem is that when the user clicks the window manager's close button in the window decorations, by
the time the GET_WINDOW_SIZE() and GET_PANE_POSITIONS() execute the window seems to have been removed and
HEIGHT, WIDTH, V_PANE_POS and H_PANE_POS return values of 0. This seemed to work well under GTK 1.2.x but
now that I have moved this to GTK 2.6 it stopped behaving as expected.
I've seen programs that seem to "ignore" the WM close button, is there a way to do that in GTK? Any
examples?
Connect to "delete_event" signal of the window. If you
don't want to destroy the window on delete, return TRUE.
Yeti
--
A: Because it messes up the order in which people normally read text.
Q: Why is top-posting such a bad thing?
A: Top-posting.
Q: What is the most annoying thing on usenet and in e-mail?
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]