Re: How to simulate window close button (what I'm really trying to do...)



On Mon, 2007-12-17 at 15:34 +0100, Toralf Lund wrote:
> Paul Davis wrote:
> > On Mon, 2007-12-17 at 13:17 +0100, Toralf Lund wrote:
> >
> >   
> >> Yeah, I know, but like I said, it's always bugged me that I have to do 
> >> something like this. It seems to me there ought to be a simple and 
> >> direct way of saying "this button should delete the window", and/or "do 
> >> a window delete now"...
> >>     
> >
> > what are the semantics of either of these operations?
> >   
> The "do a window delete now" would have the same semantics as the 
> WM_DELETE_WINDOW message from the Window manager (in the X11 
> implementation.) Or not the message itself, but whatever Gtk/Gdk does 
> when such a message is received.

that can be tricky to do directly from a signal handler because it can
involve deleting the object for which the signal is being emitted. GTK
(and gtkmm and sigc++) don't respond too well to this kind of thing.

when the window manager initiates this, all the "extra signal handlers"
do their stuff and if none of them indicate that the signal has been
handled, GTK completes the task *outside* normal signal handling scope.

--p




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