Re: How to simulate full window (manager) close-button behaviour?
- Date: Fri, 14 Dec 2007 13:35:24 +0100
- From: Toralf Lund <toralf@xxxxxxxxxxxxxx>
- Subject: Re: How to simulate full window (manager) close-button behaviour?
Emmanuele Bassi wrote:
> On Fri, 2007-12-14 at 12:55 +0100, Mathias Hasselmann wrote:
>
>
>>> I mean, usually gtk_widget_destroy() or gtk_widget_hide() will be called
>>> as part of the handling, but those functions are not what I'm looking
>>> for; I also want to execute the full event handler "chain" that may lead
>>> to these calls as well as other tests or whatever that are part of the
>>> full close behaviour.
>>>
>
> connect to the ::delete-event and override the default behaviour.
>
I don't think you understand my question. I'm not asking how to change
the behaviour. What I'm looking for is a way to execute the exact
behaviour that's configured, without having to duplicate a lot of code
and risk getting inconsistencies.
>> Pressing the close button usually causes the window manager to send the
>> WM_DELETE_WINDOW message[1], as described in the ICCCM. A short look
>> over the GDK source code didn't reveal a location where GDK _sends_ that
>> message.
>>
>
> GDK is not responsible for sending the WM_DELETE_WINDOW client message:
> the window manager is, and developers should *never* synthesise that.
>
My reason for asking was precisely that I want to avoid this, i.e. I
would like to tell Gtk to do whatever it does when it *receives* the
delete window event without actually having the program send the event
to itself.
- T
_______________________________________________
gtk-list mailing list
gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list