After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 677282 - Allow GtkClutterEmbed to follow stage size
Allow GtkClutterEmbed to follow stage size
Status: RESOLVED FIXED
Product: clutter-gtk
Classification: Platform
Component: GtkClutterEmbed
unspecified
Other Linux
: Normal normal
: ---
Assigned To: clutter-gtk maintainer(s)
clutter-gtk maintainer(s)
Depends on:
Blocks:
 
 
Reported: 2012-06-01 14:53 UTC by Alexander Larsson
Modified: 2012-06-05 10:42 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Allow GtkClutterEmbed to follow the ClutterStage size (5.63 KB, patch)
2012-06-01 14:57 UTC, Alexander Larsson
needs-work Details | Review
Allow GtkClutterEmbed to follow the ClutterStage size (5.61 KB, patch)
2012-06-01 15:13 UTC, Alexander Larsson
none Details | Review
Allow GtkClutterEmbed to follow the ClutterStage size (6.02 KB, patch)
2012-06-04 12:57 UTC, Alexander Larsson
reviewed Details | Review
Allow GtkClutterEmbed to follow the ClutterStage size (9.88 KB, patch)
2012-06-05 08:38 UTC, Alexander Larsson
none Details | Review
Allow GtkClutterEmbed to follow the ClutterStage size (9.93 KB, patch)
2012-06-05 09:07 UTC, Alexander Larsson
accepted-commit_now Details | Review

Description Alexander Larsson 2012-06-01 14:53:32 UTC
In many cases its nice to be able to have the GtkClutterEmbed follow the layouted size of the stage. For instance in boxes or documents this means we can make sure the GtkWindow is never sized smaller than the toolbars, etc.
Comment 1 Alexander Larsson 2012-06-01 14:57:05 UTC
Created attachment 215428 [details] [review]
Allow GtkClutterEmbed to follow the ClutterStage size

This is nice when you combine Gtk and Clutter layouts, for instance
to get a right minimum size for the window.
Comment 2 Alexander Larsson 2012-06-01 15:10:15 UTC
Review of attachment 215428 [details] [review]:

::: clutter-gtk/gtk-clutter-embed.c
@@ +835,2 @@
   embed->priv = priv = GTK_CLUTTER_EMBED_GET_PRIVATE (embed);
+  priv->honor_size = 1;

oops, leftover debug stuff
Comment 3 Alexander Larsson 2012-06-01 15:13:10 UTC
Created attachment 215431 [details] [review]
Allow GtkClutterEmbed to follow the ClutterStage size

This is nice when you combine Gtk and Clutter layouts, for instance
to get a right minimum size for the window.
Comment 4 Alexander Larsson 2012-06-04 12:57:02 UTC
Created attachment 215540 [details] [review]
Allow GtkClutterEmbed to follow the ClutterStage size

This is nice when you combine Gtk and Clutter layouts, for instance
to get a right minimum size for the window.
Comment 5 Alexander Larsson 2012-06-04 12:59:17 UTC
Added a new version that calls the layout manager directly, as it turns out that the stage get_preferred_width/height calls are overridden to do non-standard things.

With this in there layout seems to work properly for gnome-boxes.
Comment 6 Emmanuele Bassi (:ebassi) 2012-06-04 18:28:04 UTC
Review of attachment 215540 [details] [review]:

looks generally okay to me.

::: clutter-gtk/gtk-clutter-embed.c
@@ +379,3 @@
+      clutter_actor_get_layout_manager (priv->stage) != NULL)
+    {
+

minimal coding style fix: the curly brace should go on a separate line and indentation level.

@@ +835,1 @@
 

missing property.

@@ +914,3 @@
+
+void
+gtk_clutter_embed_set_honor_stage_size (GtkClutterEmbed *embed,

missing gtk-doc annotation; missing arguments check.

also, I'm not entirely convinced by the name; maybe set_use_layout_size() would be a better reflection of what it is that the property is doing.

@@ +928,3 @@
+
+gboolean
+  honor_size = !!honor_size;

missing gtk-doc annotation; missing arguments check.
Comment 7 Alexander Larsson 2012-06-05 08:38:05 UTC
Created attachment 215617 [details] [review]
Allow GtkClutterEmbed to follow the ClutterStage size

This is nice when you combine Gtk and Clutter layouts, for instance
to get a right minimum size for the window.
Comment 8 Alexander Larsson 2012-06-05 09:07:08 UTC
Created attachment 215619 [details] [review]
Allow GtkClutterEmbed to follow the ClutterStage size

This is nice when you combine Gtk and Clutter layouts, for instance
to get a right minimum size for the window.
Comment 9 Emmanuele Bassi (:ebassi) 2012-06-05 09:22:12 UTC
Review of attachment 215619 [details] [review]:

looks good, thanks.
Comment 10 Alexander Larsson 2012-06-05 10:42:04 UTC
pushed