From: Sjoerd Simons Date: Mon, 7 Nov 2016 21:52:45 +0000 (+0100) Subject: gdk: Ensure surface buffer scale is set X-Git-Tag: archive/raspbian/1.26.2+dfsg-1+rpi1^2~1 X-Git-Url: https://dgit.raspbian.org/?a=commitdiff_plain;h=fa20bc1c8a5caf07f99cf9306b60de4d9931f69e;p=clutter-1.0.git gdk: Ensure surface buffer scale is set GDK will only set the buffer scale for the surfaces it creates when attaching an image or when using an egl window window. Neither will happen for native clutter applications, thus directly set the buffer scale from clutter in that case (so it's in sync with the rendering scale) Signed-off-by: Sjoerd Simons https://bugzilla.gnome.org/show_bug.cgi?id=769190 Gbp-Pq: Name gdk-Ensure-surface-buffer-scale-is-set.patch --- diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c index 4b90d5c..45176a3 100644 --- a/clutter/gdk/clutter-stage-gdk.c +++ b/clutter/gdk/clutter-stage-gdk.c @@ -232,7 +232,14 @@ clutter_stage_gdk_wayland_surface (ClutterStageGdk *stage_gdk) if (!stage_gdk->foreign_window || gdk_window_get_window_type (stage_gdk->window) != GDK_WINDOW_CHILD) - return gdk_wayland_window_get_wl_surface (stage_gdk->window); + { + struct wl_surface *surface; + + surface = gdk_wayland_window_get_wl_surface (stage_gdk->window); + wl_surface_set_buffer_scale (surface, + gdk_window_get_scale_factor (stage_gdk->window)); + return surface; + } if (stage_gdk->subsurface) goto out;