[mutter] MetaWindow: add a public method for checking if the application is responding
- From: Giovanni Campagna <gcampagna src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] MetaWindow: add a public method for checking if the application is responding
- Date: Tue, 25 Dec 2012 17:44:36 +0000 (UTC)
commit 57ff0f7071b6417e769401982ac145ed3a697090
Author: Giovanni Campagna <gcampagna src gnome org>
Date: Mon Dec 24 18:15:23 2012 +0100
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
src/core/delete.c | 21 ++++++++++++++-------
src/meta/window.h | 3 +++
2 files changed, 17 insertions(+), 7 deletions(-)
---
diff --git a/src/core/delete.c b/src/core/delete.c
index 5422914..ded5dd4 100644
--- a/src/core/delete.c
+++ b/src/core/delete.c
@@ -134,6 +134,18 @@ delete_ping_timeout_func (MetaDisplay *display,
}
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
diff --git a/src/meta/window.h b/src/meta/window.h
index c8d49c9..4aec594 100644
--- a/src/meta/window.h
+++ b/src/meta/window.h
@@ -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,
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]