mirror of
https://github.com/brl/mutter.git
synced 2024-12-24 12:02:04 +00:00
Fix last commit
Actually do the changes from the review ... pushed old version of the patch :/
This commit is contained in:
parent
f9bffae9fd
commit
fa29a1a99e
@ -155,6 +155,15 @@ meta_surface_actor_wayland_get_scale (MetaSurfaceActorWayland *actor)
|
|||||||
return (double)output_scale / (double)priv->surface->scale;
|
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 *
|
static MetaWindow *
|
||||||
meta_surface_actor_wayland_get_window (MetaSurfaceActor *actor)
|
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 *min_width_p,
|
||||||
gfloat *natural_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));
|
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
|
||||||
double scale = meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (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 *min_height_p,
|
||||||
gfloat *natural_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));
|
MetaShapedTexture *stex = meta_surface_actor_get_texture (META_SURFACE_ACTOR (self));
|
||||||
double scale = meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (self));
|
double scale = meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (self));
|
||||||
|
|
||||||
|
@ -63,6 +63,7 @@ void meta_surface_actor_wayland_set_buffer (MetaSurfaceActorWayland *self,
|
|||||||
|
|
||||||
double meta_surface_actor_wayland_get_scale (MetaSurfaceActorWayland *actor);
|
double meta_surface_actor_wayland_get_scale (MetaSurfaceActorWayland *actor);
|
||||||
|
|
||||||
|
void meta_surface_actor_wayland_scale_texture (MetaSurfaceActorWayland *actor);
|
||||||
G_END_DECLS
|
G_END_DECLS
|
||||||
|
|
||||||
#endif /* __META_SURFACE_ACTOR_WAYLAND_H__ */
|
#endif /* __META_SURFACE_ACTOR_WAYLAND_H__ */
|
||||||
|
@ -551,7 +551,7 @@ meta_window_actor_get_shape_bounds (MetaWindowActor *self,
|
|||||||
|
|
||||||
cairo_region_get_extents (priv->shape_region, bounds);
|
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 ?
|
double scale = priv->surface ?
|
||||||
meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (priv->surface)) : 1.;
|
meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (priv->surface)) : 1.;
|
||||||
|
@ -376,9 +376,7 @@ commit_pending_state (MetaWaylandSurface *surface,
|
|||||||
g_list_foreach (surface->subsurfaces, parent_surface_committed, NULL);
|
g_list_foreach (surface->subsurfaces, parent_surface_committed, NULL);
|
||||||
|
|
||||||
/* scale surface texture */
|
/* scale surface texture */
|
||||||
output_scale = meta_surface_actor_wayland_get_scale (META_SURFACE_ACTOR_WAYLAND (surface->surface_actor));
|
meta_surface_actor_wayland_scale_texture (surface->surface_actor);
|
||||||
clutter_actor_set_scale (CLUTTER_ACTOR (meta_surface_actor_get_texture (surface->surface_actor)),
|
|
||||||
output_scale, output_scale);
|
|
||||||
|
|
||||||
/* wl_surface.frame */
|
/* wl_surface.frame */
|
||||||
wl_list_insert_list (&compositor->frame_callbacks, &pending->frame_callback_list);
|
wl_list_insert_list (&compositor->frame_callbacks, &pending->frame_callback_list);
|
||||||
|
Loading…
Reference in New Issue
Block a user