Re: [gtk-list] Re: How to redirect Alt-F4 to hide instead of destroy.
- From: Havoc Pennington <hp redhat com>
- To: gtk-list redhat com
- Subject: Re: [gtk-list] Re: How to redirect Alt-F4 to hide instead of destroy.
- Date: Wed, 29 Sep 1999 08:50:03 -0400 (EDT)
Hi,
Here is the deal: most window managers have two different things they can
do to your window. One is usually called "Kill", and it calls
XKillClient(), which basically nukes the application; you can't recover
from this, you have to exit. The "Close" button on window managers will
generally send you a delete_event; you can choose how to respond to
delete_event with a signal handler (if the signal _emission_ returns TRUE
then the default action will not happen; the default action is to
gtk_widget_destroy() your window).
So, you need to know whether Alt-F4 does the kill or the delete_event. If
it just does delete_event, all you have to do is connect a delete_event
handler which returns TRUE and hides the window. If it sends kill, then
your whole app has been nuked.
My book explains this in more detail.
Havoc
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]