mirror of
https://github.com/brl/mutter.git
synced 2025-06-14 01:09:30 +00:00
wayland: Use surface size helper functions
Use meta_wayland_surface_get_width / meta_wayland_surface_get_width to determine the size of a surface.
This commit is contained in:

committed by
Jonas Ådahl

parent
ad864083f9
commit
db22c13c4f
@ -152,21 +152,14 @@ meta_wayland_subsurface_union_geometry (MetaWaylandSubsurface *subsurface,
|
||||
MetaWaylandSurfaceRole *surface_role = META_WAYLAND_SURFACE_ROLE (subsurface);
|
||||
MetaWaylandSurface *surface =
|
||||
meta_wayland_surface_role_get_surface (surface_role);
|
||||
MetaWaylandBuffer *buffer;
|
||||
CoglTexture *texture;
|
||||
MetaRectangle geometry;
|
||||
GList *l;
|
||||
|
||||
buffer = surface->buffer_ref.buffer;
|
||||
if (!buffer)
|
||||
return;
|
||||
|
||||
texture = meta_wayland_buffer_get_texture (buffer);
|
||||
geometry = (MetaRectangle) {
|
||||
.x = surface->offset_x + surface->sub.x,
|
||||
.y = surface->offset_y + surface->sub.y,
|
||||
.width = cogl_texture_get_width (texture) / surface->scale,
|
||||
.height = cogl_texture_get_height (texture) / surface->scale,
|
||||
.width = meta_wayland_surface_get_width (surface),
|
||||
.height = meta_wayland_surface_get_height (surface),
|
||||
};
|
||||
|
||||
meta_rectangle_union (out_geometry, &geometry, out_geometry);
|
||||
|
Reference in New Issue
Block a user