summaryrefslogtreecommitdiff
path: root/clutter
diff options
context:
space:
mode:
authorSjoerd Simons <sjoerd@luon.net>2016-11-07 22:52:45 +0100
committerSimon McVittie <smcv@debian.org>2019-08-22 00:40:56 +0100
commit4eaafae520c0849a581aa9a1321b808a81d8ed7c (patch)
treea99c84d032660a090e7684df3eeb8e3b35fa057a /clutter
parent21a88dc739c19e32b2c52f3bde34e8ad993fd8ba (diff)
downloadclutter-4eaafae520c0849a581aa9a1321b808a81d8ed7c.tar.gz
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 <sjoerd@luon.net> https://bugzilla.gnome.org/show_bug.cgi?id=769190
Diffstat (limited to 'clutter')
-rw-r--r--clutter/gdk/clutter-stage-gdk.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c
index 2408b9756..ba8a2edef 100644
--- a/clutter/gdk/clutter-stage-gdk.c
+++ b/clutter/gdk/clutter-stage-gdk.c
@@ -231,7 +231,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;