compositor: Simplify meta_window_actor_set_updates_frozen

Since we always call it with the same value, just push that
value into the implementation.
This commit is contained in:
Jasper St. Pierre 2014-06-17 13:06:10 -04:00
parent dc6decefb5
commit 24d7c5ebe3
5 changed files with 20 additions and 17 deletions

View File

@ -691,12 +691,11 @@ meta_compositor_remove_window (MetaCompositor *compositor,
} }
void void
meta_compositor_set_updates_frozen (MetaCompositor *compositor, meta_compositor_sync_updates_frozen (MetaCompositor *compositor,
MetaWindow *window, MetaWindow *window)
gboolean updates_frozen)
{ {
MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window)); MetaWindowActor *window_actor = META_WINDOW_ACTOR (meta_window_get_compositor_private (window));
meta_window_actor_set_updates_frozen (window_actor, updates_frozen); meta_window_actor_sync_updates_frozen (window_actor);
} }
void void

View File

@ -51,8 +51,7 @@ void meta_window_actor_update_shape (MetaWindowActor *self);
void meta_window_actor_update_opacity (MetaWindowActor *self); void meta_window_actor_update_opacity (MetaWindowActor *self);
void meta_window_actor_mapped (MetaWindowActor *self); void meta_window_actor_mapped (MetaWindowActor *self);
void meta_window_actor_unmapped (MetaWindowActor *self); void meta_window_actor_unmapped (MetaWindowActor *self);
void meta_window_actor_set_updates_frozen (MetaWindowActor *self, void meta_window_actor_sync_updates_frozen (MetaWindowActor *self);
gboolean updates_frozen);
void meta_window_actor_queue_frame_drawn (MetaWindowActor *self, void meta_window_actor_queue_frame_drawn (MetaWindowActor *self,
gboolean no_delay_frame); gboolean no_delay_frame);

View File

@ -1326,7 +1326,7 @@ meta_window_actor_new (MetaWindow *window)
priv = self->priv; priv = self->priv;
meta_window_actor_set_updates_frozen (self, meta_window_updates_are_frozen (priv->window)); meta_window_actor_sync_updates_frozen (self);
/* If a window doesn't start off with updates frozen, we should /* If a window doesn't start off with updates frozen, we should
* we should send a _NET_WM_FRAME_DRAWN immediately after the first drawn. * we should send a _NET_WM_FRAME_DRAWN immediately after the first drawn.
@ -2022,7 +2022,7 @@ meta_window_actor_update_opacity (MetaWindowActor *self)
clutter_actor_set_opacity (CLUTTER_ACTOR (priv->surface), window->opacity); clutter_actor_set_opacity (CLUTTER_ACTOR (priv->surface), window->opacity);
} }
void static void
meta_window_actor_set_updates_frozen (MetaWindowActor *self, meta_window_actor_set_updates_frozen (MetaWindowActor *self,
gboolean updates_frozen) gboolean updates_frozen)
{ {
@ -2039,3 +2039,12 @@ meta_window_actor_set_updates_frozen (MetaWindowActor *self,
meta_window_actor_thaw (self); meta_window_actor_thaw (self);
} }
} }
void
meta_window_actor_sync_updates_frozen (MetaWindowActor *self)
{
MetaWindowActorPrivate *priv = self->priv;
MetaWindow *window = priv->window;
meta_window_actor_set_updates_frozen (self, meta_window_updates_are_frozen (window));
}

View File

@ -101,9 +101,8 @@ void meta_compositor_unmaximize_window (MetaCompositor *compositor,
void meta_compositor_sync_window_geometry (MetaCompositor *compositor, void meta_compositor_sync_window_geometry (MetaCompositor *compositor,
MetaWindow *window, MetaWindow *window,
gboolean did_placement); gboolean did_placement);
void meta_compositor_set_updates_frozen (MetaCompositor *compositor, void meta_compositor_sync_updates_frozen (MetaCompositor *compositor,
MetaWindow *window, MetaWindow *window);
gboolean updates_frozen);
void meta_compositor_queue_frame_drawn (MetaCompositor *compositor, void meta_compositor_queue_frame_drawn (MetaCompositor *compositor,
MetaWindow *window, MetaWindow *window,
gboolean no_delay_frame); gboolean no_delay_frame);

View File

@ -929,8 +929,7 @@ sync_request_timeout (gpointer data)
* window updates * window updates
*/ */
window->sync_request_wait_serial = 0; window->sync_request_wait_serial = 0;
meta_compositor_set_updates_frozen (window->display->compositor, window, meta_compositor_sync_updates_frozen (window->display->compositor, window);
meta_window_updates_are_frozen (window));
if (window == window->display->grab_window && if (window == window->display->grab_window &&
meta_grab_op_is_resizing (window->display->grab_op)) meta_grab_op_is_resizing (window->display->grab_op))
@ -993,8 +992,7 @@ send_sync_request (MetaWindow *window)
g_source_set_name_by_id (window->sync_request_timeout_id, g_source_set_name_by_id (window->sync_request_timeout_id,
"[mutter] sync_request_timeout"); "[mutter] sync_request_timeout");
meta_compositor_set_updates_frozen (window->display->compositor, window, meta_compositor_sync_updates_frozen (window->display->compositor, window);
meta_window_updates_are_frozen (window));
} }
static unsigned long static unsigned long
@ -3455,8 +3453,7 @@ meta_window_x11_update_sync_request_counter (MetaWindow *window,
} }
window->sync_request_serial = new_counter_value; window->sync_request_serial = new_counter_value;
meta_compositor_set_updates_frozen (window->display->compositor, window, meta_compositor_sync_updates_frozen (window->display->compositor, window);
meta_window_updates_are_frozen (window));
if (window == window->display->grab_window && if (window == window->display->grab_window &&
meta_grab_op_is_resizing (window->display->grab_op) && meta_grab_op_is_resizing (window->display->grab_op) &&