Re: [gtk-list] Re: How to redirect Alt-F4 to hide instead of destroy.



CountZero wrote:

> > I don't think the problem is that the window manager can 'destroy' a
> > single window of a multi-window application.
> >
> > I would argue that in a multi-window app, destroying one of the windows should be
> > interpreted as the user wanting to terminate the entire application.
>
> Obsolutely not... What if my program opens up several configuration windows, and then the user
> decides that he doesn't want child window 2 open?  He, (the user) for whatever reason, decides
> to use the WM's destroy function, instead of my "close" button, to kill the window.  I expect
> that the user will assume that this will ONLY destroy that window, and as such, I link my close
> window events to the "destroy" signal.  If I hooked that signal and closed my entire app, not only
> would that not be "normal" behavior for an application, but also, what if I use
> Gtk::Window->destroy to kill windows programmatically?  (Which I DO in my code)  Now I
> have sent the destroy signal to a window.  Obviously I ONLY want to close that one window
> (unless I send the "destroy" signal to the "PARENT" window, in which case I call Gtk::main_quit)
> Anyways, the point is, destroying a single window in a multi-window app DOES NOT imply
> termination of the entire app.  (In my mind at least)
>
> -Steve
>

OK, I completely agree with all that.  BUT - I believe the original poster (Wolfgang?) wanted to catch
a signal that he felt couldn't be stopped (unlike Gtk::Window->destroy and Gtk::Window->delete)
which he had bound to his Alt-F4 key.

I guess my reasoning (without actually trying to figure out what his window manager was doing),
was:

If the window manager was closing his window when he didn't want it closed and he couldn't stop
this behavior, he should close the rest of the app as well since it seems likely that the user of the app was
probably trying to eliminate the app by invoking such a function.

If he can stop the window manager from closing the window then he shouldn't close it, and obviously
he should not close down the rest of the app.


***

I probably should have tried to figure out what his window manager was doing... (grin)
Kent






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