[mutter] Fix last commit



commit fa29a1a99e29c085cf86cd497f6d1ae9562f7071
Author: Adel Gadllah <adel gadllah gmail com>
Date:   Sat May 3 11:59:07 2014 +0200

    Fix last commit
    
    Actually do the changes from the review ... pushed old version of the
    patch :/

 src/compositor/meta-surface-actor-wayland.c |   11 +++++++++--
 src/compositor/meta-surface-actor-wayland.h |    1 +
 src/compositor/meta-window-actor.c          |    2 +-
 src/wayland/meta-wayland-surface.c          |    4 +---
 4 files changed, 12 insertions(+), 6 deletions(-)
---
diff --git a/src/compositor/meta-surface-actor-wayland.c b/src/compositor/meta-surface-actor-wayland.c
index c553228..7846b29 100644
--- a/src/compositor/meta-surface-actor-wayland.c
+++ b/src/compositor/meta-surface-actor-wayland.c
@@ -155,6 +155,15 @@ meta_surface_actor_wayland_get_scale (MetaSurfaceActorWayland *actor)
    return (double)output_scale / (double)priv->surface->scale;
 }
 
+void
+meta_surface_actor_wayland_scale_texture (MetaSurfaceActorWayland *actor)
+{
+  MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (actor));
+  double output_scale = meta_surface_actor_wayland_get_scale (actor);
+
+  clutter_actor_set_scale (CLUTTER_ACTOR (stex), output_scale, output_scale);
+}
+
 static MetaWindow *
 meta_surface_actor_wayland_get_window (MetaSurfaceActor *actor)
 {
@@ -169,7 +178,6 @@ meta_surface_actor_wayland_get_preferred_width  (ClutterActor *self,
                                                  gfloat       *min_width_p,
                                                  gfloat       *natural_width_p)
 {
-  MetaSurfaceActorWaylandPrivate *priv = meta_surface_actor_wayland_get_instance_private (self);
   MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
   double scale = meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (self));
 
@@ -188,7 +196,6 @@ meta_surface_actor_wayland_get_preferred_height  (ClutterActor *self,
                                                   gfloat       *min_height_p,
                                                   gfloat       *natural_height_p)
 {
-  MetaSurfaceActorWaylandPrivate *priv = meta_surface_actor_wayland_get_instance_private (self);
   MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
   double scale = meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (self));
 
diff --git a/src/compositor/meta-surface-actor-wayland.h b/src/compositor/meta-surface-actor-wayland.h
index f820523..efd4a56 100644
--- a/src/compositor/meta-surface-actor-wayland.h
+++ b/src/compositor/meta-surface-actor-wayland.h
@@ -63,6 +63,7 @@ void meta_surface_actor_wayland_set_buffer (MetaSurfaceActorWayland *self,
 
 double meta_surface_actor_wayland_get_scale (MetaSurfaceActorWayland *actor);
 
+void meta_surface_actor_wayland_scale_texture (MetaSurfaceActorWayland *actor);
 G_END_DECLS
 
 #endif /* __META_SURFACE_ACTOR_WAYLAND_H__ */
diff --git a/src/compositor/meta-window-actor.c b/src/compositor/meta-window-actor.c
index c1628d5..5bc650f 100644
--- a/src/compositor/meta-window-actor.c
+++ b/src/compositor/meta-window-actor.c
@@ -551,7 +551,7 @@ meta_window_actor_get_shape_bounds (MetaWindowActor       *self,
 
   cairo_region_get_extents (priv->shape_region, bounds);
 
-  if (meta_is_wayland_compositor ())
+  if (META_IS_SURFACE_ACTOR_WAYLAND (priv->surface))
     {
       double scale = priv->surface ?
                      meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (priv->surface)) : 1.;
diff --git a/src/wayland/meta-wayland-surface.c b/src/wayland/meta-wayland-surface.c
index 6a47167..ee332a5 100644
--- a/src/wayland/meta-wayland-surface.c
+++ b/src/wayland/meta-wayland-surface.c
@@ -376,9 +376,7 @@ commit_pending_state (MetaWaylandSurface      *surface,
   g_list_foreach (surface->subsurfaces, parent_surface_committed, NULL);
 
   /* scale surface texture */
-  output_scale = meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor));
-  clutter_actor_set_scale (CLUTTER_ACTOR (meta_surface_actor_get_texture (surface->surface_actor)),
-                           output_scale, output_scale);
+  meta_surface_actor_wayland_scale_texture (surface->surface_actor);
 
   /* wl_surface.frame */
   wl_list_insert_list (&compositor->frame_callbacks, &pending->frame_callback_list);


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]