summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdel Gadllah <adel.gadllah@gmail.com>2014-02-14 15:16:41 +0100
committerAdel Gadllah <adel.gadllah@gmail.com>2014-02-14 15:35:20 +0100
commit2edce832b767d54b9c0f45d3e9bb549433e28c35 (patch)
tree2b6e9438f560f4eade021fb24926e5a1ecc4c855
parent15a1e9e9ca42e6dbd982265403131dfc504651cd (diff)
downloadclutter-gtk-2edce832b767d54b9c0f45d3e9bb549433e28c35.tar.gz
embed: Pass scaled size back to clutter
Instead of messing with the allocation leave it as is and send the scaled size to clutter in the synthetic XConfigureEvent. https://bugzilla.gnome.org/show_bug.cgi?id=724055
-rw-r--r--clutter-gtk/gtk-clutter-embed.c9
1 files changed, 2 insertions, 7 deletions
diff --git a/clutter-gtk/gtk-clutter-embed.c b/clutter-gtk/gtk-clutter-embed.c
index 5204860..ac4f1d7 100644
--- a/clutter-gtk/gtk-clutter-embed.c
+++ b/clutter-gtk/gtk-clutter-embed.c
@@ -508,11 +508,6 @@ 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),
@@ -531,8 +526,8 @@ gtk_clutter_embed_size_allocate (GtkWidget *widget,
{
XConfigureEvent xevent = { ConfigureNotify };
xevent.window = GDK_WINDOW_XID (gtk_widget_get_window (widget));
- xevent.width = allocation->width;
- xevent.height = allocation->height;
+ xevent.width = allocation->width * scale_factor;
+ xevent.height = allocation->height * scale_factor;
/* Ensure cogl knows about the new size immediately, as we will
draw before we get the ConfigureNotify response. */