Re: hiding windows when pressing on window manager (X)

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

 



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
_______________________________________________

gtk-list@xxxxxxxxx
http://mail.gnome.org/mailman/listinfo/gtk-list

[Index of Archives]     [Touch Screen Library]     [GIMP Users]     [Gnome]     [KDE]     [Yosemite News]     [Steve's Art]

  Powered by Linux