Re: hiding windows when pressing on window manager (X)
- From: Tim Müller <t i m zen co uk>
- To: gtk-list gnome org, Neil Zanella <nzanella gmail com>
- Cc: 
- Subject: Re: hiding windows when pressing on window manager (X)
- Date: Fri, 3 Dec 2004 10:04:23 +0000
On Friday 03 December 2004 01:29, Paul Davis wrote:
> On Friday 03 December 2004 00:09, Neil Zanella wrote:
> > I would like to know, is there a way to tell GTK that when the user
> > clicks on the window manager's (X) usually found in the upper right hand
> > corner of window  frames, the window is to be hidden instead of destroyed?
> > This behavior is  the one needed for child windows of parent windows which
> > the main application usually just hides. 
>
> connect to the "delete" event for the window, and return TRUE in your
> handler. this bypasses the usual handling of the event and leaves the
> window.
There's even a gtk_widget_hide_on_delete(), which does exactly this for you:
 g_signal_connect (window, "delete-event", 
                             G_CALLBACK (gtk_widget_hide_on_delete), 
                             NULL);
 Cheers
  -Tim
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]