[gtk-frdp] frdp-display/session: Update widget alignment while drawing
- From: Felipe Borges <felipeborges src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtk-frdp] frdp-display/session: Update widget alignment while drawing
- Date: Tue, 5 Apr 2022 14:42:52 +0000 (UTC)
commit 8409614d9528a04934fe4678d18584e7af9fb774
Author: Felipe Borges <felipeborges gnome org>
Date: Tue Apr 5 16:39:06 2022 +0200
frdp-display/session: Update widget alignment while drawing
src/frdp-display.c | 3 ---
src/frdp-session.c | 3 ++-
2 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/src/frdp-display.c b/src/frdp-display.c
index 94d9006..d66f685 100644
--- a/src/frdp-display.c
+++ b/src/frdp-display.c
@@ -516,9 +516,6 @@ frdp_display_set_scaling (FrdpDisplay *display,
gtk_widget_set_halign (GTK_WIDGET (display), GTK_ALIGN_FILL);
gtk_widget_set_valign (GTK_WIDGET (display), GTK_ALIGN_FILL);
- } else {
- gtk_widget_set_halign (GTK_WIDGET (display), GTK_ALIGN_CENTER);
- gtk_widget_set_valign (GTK_WIDGET (display), GTK_ALIGN_CENTER);
}
gtk_widget_queue_draw_area (GTK_WIDGET (display), 0, 0,
diff --git a/src/frdp-session.c b/src/frdp-session.c
index f4141f8..c21e872 100644
--- a/src/frdp-session.c
+++ b/src/frdp-session.c
@@ -188,7 +188,6 @@ create_cairo_surface (FrdpSession *self)
gtk_widget_set_size_request (priv->display,
settings->DesktopWidth,
settings->DesktopHeight);
-
stride = cairo_format_stride_for_width (priv->cairo_format, gdi->width);
self->priv->surface =
cairo_image_surface_create_for_data ((unsigned char*) gdi->primary_buffer,
@@ -257,6 +256,8 @@ frdp_session_draw (GtkWidget *widget,
cairo_set_source_surface (cr, self->priv->surface, 0, 0);
cairo_paint (cr);
+ frdp_display_set_scaling (self->priv->display, self->priv->scaling);
+
return TRUE;
}
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]