[MetaDisplay] Added window-demands-attention signal

Having a MetaDisplay::window-demands-attention signal allows to deal with
windows demanding attention in a cetralized fashion.

The signal is emitted when a window is created with initial demands-attention
state and/or when the state changes later on.

Based on original patch by Jon Nettleton.

https://bugzilla.gnome.org/show_bug.cgi?id=597052
This commit is contained in:
Tomas Frydrych
2009-10-28 17:19:24 +00:00
parent 2a14deab0c
commit 7579b691df
2 changed files with 19 additions and 1 deletions

View File

@@ -130,6 +130,7 @@ enum
OVERLAY_KEY,
FOCUS_WINDOW,
WINDOW_CREATED,
WINDOW_DEMANDS_ATTENTION,
LAST_SIGNAL
};
@@ -236,6 +237,14 @@ meta_display_class_init (MetaDisplayClass *klass)
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, META_TYPE_WINDOW);
display_signals[WINDOW_DEMANDS_ATTENTION] =
g_signal_new ("window-demands-attention",
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0,
NULL, NULL,
g_cclosure_marshal_VOID__OBJECT,
G_TYPE_NONE, 1, META_TYPE_WINDOW);
g_object_class_install_property (object_class,
PROP_FOCUS_WINDOW,