summaryrefslogtreecommitdiff
path: root/clutter-gtk
diff options
context:
space:
mode:
authorAdel Gadllah <adel.gadllah@gmail.com>2014-02-14 14:13:34 +0100
committerAdel Gadllah <adel.gadllah@gmail.com>2014-02-14 14:57:00 +0100
commit15a1e9e9ca42e6dbd982265403131dfc504651cd (patch)
treee873977a38cecab4f8847b7a2cb7b361f0d3e459 /clutter-gtk
parentcae450696787485bb3db024f2c7b7e59d6fc2ccb (diff)
downloadclutter-gtk-15a1e9e9ca42e6dbd982265403131dfc504651cd.tar.gz
GtkClutterEmbed: Scale allocation by the scale factor
https://bugzilla.gnome.org/show_bug.cgi?id=724055
Diffstat (limited to 'clutter-gtk')
-rw-r--r--clutter-gtk/gtk-clutter-embed.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/clutter-gtk/gtk-clutter-embed.c b/clutter-gtk/gtk-clutter-embed.c
index 14d99bf..5204860 100644
--- a/clutter-gtk/gtk-clutter-embed.c
+++ b/clutter-gtk/gtk-clutter-embed.c
@@ -499,6 +499,7 @@ gtk_clutter_embed_size_allocate (GtkWidget *widget,
GtkAllocation *allocation)
{
GtkClutterEmbedPrivate *priv = GTK_CLUTTER_EMBED (widget)->priv;
+ int scale_factor = gtk_widget_get_scale_factor (widget);
gtk_widget_set_allocation (widget, allocation);
@@ -507,6 +508,11 @@ gtk_clutter_embed_size_allocate (GtkWidget *widget,
*/
clutter_actor_set_size (priv->stage, allocation->width, allocation->height);
+ allocation->x = allocation->x * scale_factor;
+ allocation->x = allocation->x * scale_factor;
+ allocation->width = allocation->width * scale_factor;
+ allocation->height = allocation->height * scale_factor;
+
if (gtk_widget_get_realized (widget))
{
gdk_window_move_resize (gtk_widget_get_window (widget),