MetaWindow: add a public method for checking if the application is responding

Add meta_window_check_alive(), which is a simple wrapper over
meta_display_ping_window(), and takes care of showing the "Application
is not responding dialog" if needed.

https://bugzilla.gnome.org/show_bug.cgi?id=684340
This commit is contained in:
Giovanni Campagna 2012-12-24 18:15:23 +01:00
parent 2a2ac52726
commit 57ff0f7071
2 changed files with 17 additions and 7 deletions

View File

@ -133,6 +133,18 @@ delete_ping_timeout_func (MetaDisplay *display,
g_child_watch_add (dialog_pid, dialog_exited, window);
}
void
meta_window_check_alive (MetaWindow *window,
guint32 timestamp)
{
meta_display_ping_window (window->display,
window,
timestamp,
delete_ping_reply_func,
delete_ping_timeout_func,
window);
}
void
meta_window_delete (MetaWindow *window,
guint32 timestamp)
@ -156,13 +168,8 @@ meta_window_delete (MetaWindow *window,
}
meta_error_trap_pop (window->display);
meta_display_ping_window (window->display,
window,
timestamp,
delete_ping_reply_func,
delete_ping_timeout_func,
window);
meta_window_check_alive (window, timestamp);
if (window->has_focus)
{
/* FIXME Clean this up someday

View File

@ -190,6 +190,9 @@ void meta_window_kill (MetaWindow *window);
void meta_window_focus (MetaWindow *window,
guint32 timestamp);
void meta_window_check_alive (MetaWindow *window,
guint32 timestamp);
void meta_window_begin_grab_op (MetaWindow *window,
MetaGrabOp op,
gboolean frame_action,