From 1e17ba1768e559580226d004861d71336e18cfed Mon Sep 17 00:00:00 2001 From: Tomas Frydrych Date: Mon, 2 Feb 2009 14:08:46 +0000 Subject: [PATCH] MetaWindow::raised signal. --- src/core/window-private.h | 1 + src/core/window.c | 12 ++++++++++++ 2 files changed, 13 insertions(+) diff --git a/src/core/window-private.h b/src/core/window-private.h index 155788331..efdb3476e 100644 --- a/src/core/window-private.h +++ b/src/core/window-private.h @@ -370,6 +370,7 @@ struct _MetaWindowClass void (*workspace_changed) (MetaWindow *window, int old_workspace); void (*focus) (MetaWindow *window); + void (*raised) (MetaWindow *window); }; /* These differ from window->has_foo_func in that they consider diff --git a/src/core/window.c b/src/core/window.c index 759c7a44b..e4d51cc62 100644 --- a/src/core/window.c +++ b/src/core/window.c @@ -146,6 +146,7 @@ enum { WORKSPACE_CHANGED, FOCUS, + RAISED, LAST_SIGNAL }; @@ -266,6 +267,15 @@ meta_window_class_init (MetaWindowClass *klass) NULL, NULL, g_cclosure_marshal_VOID__VOID, G_TYPE_NONE, 0); + + window_signals[RAISED] = + g_signal_new ("raised", + G_TYPE_FROM_CLASS (object_class), + G_SIGNAL_RUN_LAST, + G_STRUCT_OFFSET (MetaWindowClass, raised), + NULL, NULL, + g_cclosure_marshal_VOID__VOID, + G_TYPE_NONE, 0); } static void @@ -4757,6 +4767,8 @@ meta_window_raise (MetaWindow *window) */ if (window != ancestor) meta_stack_raise (window->screen->stack, window); + + g_signal_emit (window, window_signals[RAISED], 0); } void