summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc-André Lureau <marcandre.lureau@redhat.com>2021-02-12 00:27:33 +0400
committerMarc-André Lureau <marcandre.lureau@redhat.com>2021-04-09 21:08:46 +0400
commita36184001c894f25409392173e5f32c537b8b835 (patch)
treec3a0333956f776ef7d13164ae081a9f34a722334
parent0ad07adc3ea3cce66f5551104caabea6a7e5ab6b (diff)
Rename spice_cairo_is_scaled -> allow_scaling
As it is just a getter for allow_scaling. Signed-off-by: Marc-André Lureau <marcandre.lureau@redhat.com>
-rw-r--r--src/spice-widget-cairo.c2
-rw-r--r--src/spice-widget-priv.h2
-rw-r--r--src/spice-widget.c4
3 files changed, 4 insertions, 4 deletions
diff --git a/src/spice-widget-cairo.c b/src/spice-widget-cairo.c
index 4d25c08..fec6363 100644
--- a/src/spice-widget-cairo.c
+++ b/src/spice-widget-cairo.c
@@ -141,7 +141,7 @@ void spice_cairo_draw_event(SpiceDisplay *display, cairo_t *cr)
}
G_GNUC_INTERNAL
-gboolean spice_cairo_is_scaled(SpiceDisplay *display)
+gboolean spice_allow_scaling(SpiceDisplay *display)
{
SpiceDisplayPrivate *d = display->priv;
return d->allow_scaling;
diff --git a/src/spice-widget-priv.h b/src/spice-widget-priv.h
index a9883d6..2c68716 100644
--- a/src/spice-widget-priv.h
+++ b/src/spice-widget-priv.h
@@ -158,7 +158,7 @@ struct _SpiceDisplayPrivate {
int spice_cairo_image_create (SpiceDisplay *display);
void spice_cairo_image_destroy (SpiceDisplay *display);
void spice_cairo_draw_event (SpiceDisplay *display, cairo_t *cr);
-gboolean spice_cairo_is_scaled (SpiceDisplay *display);
+gboolean spice_allow_scaling (SpiceDisplay *display);
void spice_display_get_scaling (SpiceDisplay *display, double *s, int *x, int *y, int *w, int *h);
gboolean spice_egl_init (SpiceDisplay *display, GError **err);
gboolean spice_egl_realize_display (SpiceDisplay *display, GdkWindow *win,
diff --git a/src/spice-widget.c b/src/spice-widget.c
index b618b76..50824bf 100644
--- a/src/spice-widget.c
+++ b/src/spice-widget.c
@@ -1364,7 +1364,7 @@ static void recalc_geometry(GtkWidget *widget)
gint scale_factor, height_mm = 0, width_mm = 0;
bool has_display_mm = false;
- if (spice_cairo_is_scaled(display))
+ if (spice_allow_scaling(display))
zoom = (gdouble)d->zoom_level / 100;
scale_factor = gtk_widget_get_scale_factor(GTK_WIDGET(display));
@@ -3137,7 +3137,7 @@ void spice_display_get_scaling(SpiceDisplay *display,
wh = fbh;
}
- if (!spice_cairo_is_scaled(display)) {
+ if (!spice_allow_scaling(display)) {
s = 1.0;
x = 0;
y = 0;