Re: Bypassing Force Quit



On Wed, May 16, 2007 at 11:28:55AM -0700, Brian J. Tarricone wrote:

I am running on FedoraCore5 and I have an application that when the
user clicks the "X" in the upper right wants to query for saving any
changed data.  I have currently coded this as a signal handler for the
delete event which puts up a modal dialog box with the questions and
waits for the user's response.  However, after some internal timeout,
I get another dialog box warning me that the window titled "..." is
not responding and do I want to force it to quit, losing all of my
data.

...

This is caused by the window manager, not gtk.  It thinks the
application isn't responding because it takes too long to return from
the delete-event handler.

This is interesting, do you know what exactly the window
manager is waiting for?  Because it has of course no idea
what your code does inside (namely whether it is in some
handler or not) -- and you let Gtk+ main loop run, so it
responds to events normally.  Therefore the window manager
expects some specific reaction from the client on delete.

However, it cannot be destruction of the window as that
would break all applications that allow one to cancel the
closing of the window.  Returning TRUE also prevents the
default Gtk+ handler from running, so anything else Gtk+
could do there cannot be the thing.  So what is it?

Yeti

--
http://gwyddion.net/



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