[clutter] gdk: Implement get_scale_factor()
- From: Emmanuele Bassi <ebassi src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [clutter] gdk: Implement get_scale_factor()
- Date: Mon, 12 Jan 2015 15:07:18 +0000 (UTC)
commit 2aac32694c85ee077aff32adef8abc207703e9c0
Author: Emmanuele Bassi <ebassi gnome org>
Date: Mon Jan 12 15:04:27 2015 +0000
gdk: Implement get_scale_factor()
Otherwise scaling will not work correctly.
clutter/gdk/clutter-stage-gdk.c | 12 ++++++++++++
1 files changed, 12 insertions(+), 0 deletions(-)
---
diff --git a/clutter/gdk/clutter-stage-gdk.c b/clutter/gdk/clutter-stage-gdk.c
index c0188e0..0ca8111 100644
--- a/clutter/gdk/clutter-stage-gdk.c
+++ b/clutter/gdk/clutter-stage-gdk.c
@@ -433,6 +433,17 @@ clutter_stage_gdk_can_clip_redraws (ClutterStageWindow *stage_window)
return TRUE;
}
+static int
+clutter_stage_gdk_get_scale_factor (ClutterStageWindow *stage_window)
+{
+ ClutterStageGdk *stage_gdk = CLUTTER_STAGE_GDK (stage_window);
+
+ if (stage_gdk->window == NULL)
+ return 1;
+
+ return gdk_window_get_scale_factor (stage_gdk->window);
+}
+
static void
clutter_stage_gdk_dispose (GObject *gobject)
{
@@ -489,6 +500,7 @@ clutter_stage_window_iface_init (ClutterStageWindowIface *iface)
iface->realize = clutter_stage_gdk_realize;
iface->unrealize = clutter_stage_gdk_unrealize;
iface->can_clip_redraws = clutter_stage_gdk_can_clip_redraws;
+ iface->get_scale_factor = clutter_stage_gdk_get_scale_factor;
}
/**
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]