mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 00:20:42 -05:00
wayland/surface-role: Make geometry scale API return int
Geometry scale are always ints, callers always assumed they were ints, but they were doubles. Make them ints. Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2460>
This commit is contained in:
parent
a49c4e188a
commit
71ea01f54c
@ -157,7 +157,7 @@ meta_wayland_actor_surface_emit_frame_callbacks (MetaWaylandActorSurface *actor_
|
||||
}
|
||||
}
|
||||
|
||||
double
|
||||
int
|
||||
meta_wayland_actor_surface_get_geometry_scale (MetaWaylandActorSurface *actor_surface)
|
||||
{
|
||||
MetaWaylandActorSurfaceClass *actor_surface_class =
|
||||
|
@ -33,12 +33,12 @@ struct _MetaWaylandActorSurfaceClass
|
||||
{
|
||||
MetaWaylandSurfaceRoleClass parent_class;
|
||||
|
||||
double (* get_geometry_scale) (MetaWaylandActorSurface *actor_surface);
|
||||
int (* get_geometry_scale) (MetaWaylandActorSurface *actor_surface);
|
||||
void (* sync_actor_state) (MetaWaylandActorSurface *actor_surface);
|
||||
};
|
||||
|
||||
void meta_wayland_actor_surface_sync_actor_state (MetaWaylandActorSurface *actor_surface);
|
||||
double meta_wayland_actor_surface_get_geometry_scale (MetaWaylandActorSurface *actor_surface);
|
||||
int meta_wayland_actor_surface_get_geometry_scale (MetaWaylandActorSurface *actor_surface);
|
||||
|
||||
META_EXPORT_TEST
|
||||
MetaSurfaceActor * meta_wayland_actor_surface_get_actor (MetaWaylandActorSurface *actor_surface);
|
||||
|
@ -84,7 +84,7 @@ dnd_surface_find_logical_monitor (MetaWaylandActorSurface *actor_surface)
|
||||
point.x, point.y);
|
||||
}
|
||||
|
||||
static double
|
||||
static int
|
||||
dnd_subsurface_get_geometry_scale (MetaWaylandActorSurface *actor_surface)
|
||||
{
|
||||
if (meta_is_stage_views_scaled ())
|
||||
@ -96,7 +96,7 @@ dnd_subsurface_get_geometry_scale (MetaWaylandActorSurface *actor_surface)
|
||||
MetaLogicalMonitor *logical_monitor;
|
||||
|
||||
logical_monitor = dnd_surface_find_logical_monitor (actor_surface);
|
||||
return meta_logical_monitor_get_scale (logical_monitor);
|
||||
return (int) roundf (meta_logical_monitor_get_scale (logical_monitor));
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -234,7 +234,7 @@ meta_wayland_shell_surface_surface_apply_state (MetaWaylandSurfaceRole *surface
|
||||
MetaWaylandSurfaceRoleClass *surface_role_class;
|
||||
MetaWindow *window;
|
||||
MetaWaylandBuffer *buffer;
|
||||
double geometry_scale;
|
||||
int geometry_scale;
|
||||
|
||||
surface_role_class =
|
||||
META_WAYLAND_SURFACE_ROLE_CLASS (meta_wayland_shell_surface_parent_class);
|
||||
@ -285,7 +285,7 @@ meta_wayland_shell_surface_notify_subsurface_state_changed (MetaWaylandSurfaceRo
|
||||
meta_window_actor_wayland_rebuild_surface_tree (window_actor);
|
||||
}
|
||||
|
||||
static double
|
||||
static int
|
||||
meta_wayland_shell_surface_get_geometry_scale (MetaWaylandActorSurface *actor_surface)
|
||||
{
|
||||
MetaWaylandSurfaceRole *surface_role =
|
||||
|
@ -227,7 +227,7 @@ meta_wayland_subsurface_notify_subsurface_state_changed (MetaWaylandSurfaceRole
|
||||
return meta_wayland_surface_notify_subsurface_state_changed (parent);
|
||||
}
|
||||
|
||||
static double
|
||||
static int
|
||||
meta_wayland_subsurface_get_geometry_scale (MetaWaylandActorSurface *actor_surface)
|
||||
{
|
||||
MetaWaylandSurfaceRole *surface_role =
|
||||
|
@ -184,7 +184,7 @@ meta_xwayland_surface_get_window (MetaWaylandSurfaceRole *surface_role)
|
||||
return xwayland_surface->window;
|
||||
}
|
||||
|
||||
static double
|
||||
static int
|
||||
meta_xwayland_surface_get_geometry_scale (MetaWaylandActorSurface *actor_surface)
|
||||
{
|
||||
return 1;
|
||||
|
Loading…
Reference in New Issue
Block a user