[mutter] MetaWindowActor: Add a 'position-changed' signal
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter] MetaWindowActor: Add a 'position-changed' signal
- Date: Thu, 3 Feb 2011 04:56:24 +0000 (UTC)
commit a9504f14959d81f0b4923d60fc510eae2ee5a418
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Tue Feb 1 11:24:39 2011 -0500
MetaWindowActor: Add a 'position-changed' signal
Similar to the recently added 'size-changed' signal, we may want to do
something in response to a window being repositioned without waiting for
notify::allocation. (Especially since what we can do in notify::allocation
is severely limited by Clutter forbidding queueing an allocation at that
point.)
https://bugzilla.gnome.org/show_bug.cgi?id=641310
src/compositor/meta-window-actor.c | 10 ++++++++++
1 files changed, 10 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index b387e03..1d75555 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -25,6 +25,7 @@
#include "meta-window-actor-private.h"
enum {
+ POSITION_CHANGED,
SIZE_CHANGED,
LAST_SIGNAL
};
@@ -284,6 +285,13 @@ meta_window_actor_class_init (MetaWindowActorClass *klass)
PROP_SHADOW_CLASS,
pspec);
+ signals[POSITION_CHANGED] =
+ g_signal_new ("position-changed",
+ G_TYPE_FROM_CLASS (klass),
+ G_SIGNAL_RUN_LAST,
+ 0, NULL, NULL,
+ g_cclosure_marshal_VOID__VOID,
+ G_TYPE_NONE, 0);
signals[SIZE_CHANGED] =
g_signal_new ("size-changed",
G_TYPE_FROM_CLASS (klass),
@@ -1332,6 +1340,8 @@ meta_window_actor_sync_actor_position (MetaWindowActor *self)
window_rect.x, window_rect.y);
clutter_actor_set_size (CLUTTER_ACTOR (self),
window_rect.width, window_rect.height);
+
+ g_signal_emit (self, signals[POSITION_CHANGED], 0);
}
void
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]