[pinpoint] clutter: Quit the main loop when the window close button is pressed
- From: Damien Lespiau <dlespiau src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [pinpoint] clutter: Quit the main loop when the window close button is pressed
- Date: Sat, 23 Jul 2011 14:59:32 +0000 (UTC)
commit 579e7072a4cc16eb4f3291babfc54c4a7946cf70
Author: Damien Lespiau <damien lespiau intel com>
Date: Sat Jul 23 15:58:00 2011 +0100
clutter: Quit the main loop when the window close button is pressed
If the stage is not the default stage any more, Clutter does not quit
the main loop for you.
pp-clutter.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/pp-clutter.c b/pp-clutter.c
index a7126bf..0517814 100644
--- a/pp-clutter.c
+++ b/pp-clutter.c
@@ -757,6 +757,16 @@ clutter_renderer_init_speaker_screen (ClutterRenderer *renderer)
}
+static gboolean
+stage_deleted (ClutterStage *stage,
+ ClutterEvent *event,
+ gpointer user_data)
+{
+ clutter_main_quit ();
+
+ return TRUE;
+}
+
static void
clutter_renderer_init (PinPointRenderer *pp_renderer,
char *pinpoint_file)
@@ -806,6 +816,8 @@ clutter_renderer_init (PinPointRenderer *pp_renderer,
clutter_stage_set_color (CLUTTER_STAGE (stage), &black);
+ g_signal_connect (stage, "delete-event",
+ G_CALLBACK (stage_deleted), renderer);
g_signal_connect (stage, "key-press-event",
G_CALLBACK (key_pressed), renderer);
g_signal_connect (stage, "notify::width",
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]