[mutter/wip/wayland] meta-wayland: Add a handler for the stage being destroyed
- From: Neil Roberts <nroberts src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/wip/wayland] meta-wayland: Add a handler for the stage being destroyed
- Date: Wed, 11 Jan 2012 20:04:07 +0000 (UTC)
commit 65784b0d02f7a0ec9a1c72e4f7d839c02f978e20
Author: Neil Roberts <neil linux intel com>
Date: Wed Jan 11 17:25:13 2012 +0000
meta-wayland: Add a handler for the stage being destroyed
This just calls meta_quit as a convenient way of killing the
compositor while debugging.
src/wayland/meta-wayland.c | 9 +++++++++
1 files changed, 9 insertions(+), 0 deletions(-)
---
diff --git a/src/wayland/meta-wayland.c b/src/wayland/meta-wayland.c
index 6e67a27..97594a4 100644
--- a/src/wayland/meta-wayland.c
+++ b/src/wayland/meta-wayland.c
@@ -47,6 +47,7 @@
#include "display-private.h"
#include "window-private.h"
#include <meta/types.h>
+#include <meta/main.h>
#include "frame.h"
static MetaWaylandCompositor _meta_wayland_compositor;
@@ -988,6 +989,12 @@ bind_xserver (struct wl_client *client,
compositor->init_loop = NULL;
}
+static void
+stage_destroy_cb (void)
+{
+ meta_quit (META_EXIT_SUCCESS);
+}
+
void
meta_wayland_init (void)
{
@@ -1027,6 +1034,8 @@ meta_wayland_init (void)
clutter_stage_set_user_resizable (CLUTTER_STAGE (compositor->stage), FALSE);
g_signal_connect_after (compositor->stage, "paint",
G_CALLBACK (paint_finished_cb), compositor);
+ g_signal_connect (compositor->stage, "destroy",
+ G_CALLBACK (stage_destroy_cb), NULL);
meta_wayland_compositor_create_output (compositor, 0, 0, 800, 600);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]