[mutter/gnome-3-14] MetaWindowActor: don't overwrite send_frame_messages_timer
- From: Owen Taylor <otaylor src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [mutter/gnome-3-14] MetaWindowActor: don't overwrite send_frame_messages_timer
- Date: Tue, 2 Dec 2014 16:50:02 +0000 (UTC)
commit 56e74b1ea8ae37b88ba4b48388cd582d77c9dd91
Author: Owen W. Taylor <otaylor fishsoup net>
Date: Fri Oct 17 08:58:28 2014 -0400
MetaWindowActor: don't overwrite send_frame_messages_timer
If the app finished multiple frames before we sent _NET_WM_FRAME_DRAWN,
we could add the send_frame_messages_timer multiple times. In the rare
case that the app immediately closed the window, the older timeout
could potentially then run on the freed actor.
https://bugzilla.gnome.org/show_bug.cgi?id=738686
src/compositor/meta-window-actor.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
---
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index 254a1a9..3d6fab1 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -939,6 +939,10 @@ static void
queue_send_frame_messages_timeout (MetaWindowActor *self)
{
MetaWindowActorPrivate *priv = self->priv;
+
+ if (priv->send_frame_messages_timer != 0)
+ return;
+
MetaDisplay *display = meta_window_get_display (priv->window);
gint64 current_time = meta_compositor_monotonic_time_to_server_time (display, g_get_monotonic_time ());
MetaMonitorManager *monitor_manager = meta_monitor_manager_get ();
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]