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:
parent
2a2ac52726
commit
57ff0f7071
@ -133,6 +133,18 @@ delete_ping_timeout_func (MetaDisplay *display,
|
|||||||
g_child_watch_add (dialog_pid, dialog_exited, window);
|
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
|
void
|
||||||
meta_window_delete (MetaWindow *window,
|
meta_window_delete (MetaWindow *window,
|
||||||
guint32 timestamp)
|
guint32 timestamp)
|
||||||
@ -156,12 +168,7 @@ meta_window_delete (MetaWindow *window,
|
|||||||
}
|
}
|
||||||
meta_error_trap_pop (window->display);
|
meta_error_trap_pop (window->display);
|
||||||
|
|
||||||
meta_display_ping_window (window->display,
|
meta_window_check_alive (window, timestamp);
|
||||||
window,
|
|
||||||
timestamp,
|
|
||||||
delete_ping_reply_func,
|
|
||||||
delete_ping_timeout_func,
|
|
||||||
window);
|
|
||||||
|
|
||||||
if (window->has_focus)
|
if (window->has_focus)
|
||||||
{
|
{
|
||||||
|
@ -190,6 +190,9 @@ void meta_window_kill (MetaWindow *window);
|
|||||||
void meta_window_focus (MetaWindow *window,
|
void meta_window_focus (MetaWindow *window,
|
||||||
guint32 timestamp);
|
guint32 timestamp);
|
||||||
|
|
||||||
|
void meta_window_check_alive (MetaWindow *window,
|
||||||
|
guint32 timestamp);
|
||||||
|
|
||||||
void meta_window_begin_grab_op (MetaWindow *window,
|
void meta_window_begin_grab_op (MetaWindow *window,
|
||||||
MetaGrabOp op,
|
MetaGrabOp op,
|
||||||
gboolean frame_action,
|
gboolean frame_action,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user