mirror of
https://github.com/brl/mutter.git
synced 2024-11-23 08:30:42 -05:00
[stage] Now that get_geometry works, use it
We want the actual window geometry in clutter_stage_set_minimum_size, not the set size. Now that the geometry function has been changed to do what it says, use it.
This commit is contained in:
parent
4887707bb3
commit
cea9de7f04
@ -2344,7 +2344,7 @@ clutter_stage_set_minimum_size (ClutterStage *stage,
|
|||||||
guint height)
|
guint height)
|
||||||
{
|
{
|
||||||
gboolean resize;
|
gboolean resize;
|
||||||
gfloat current_width, current_height;
|
ClutterGeometry geom;
|
||||||
|
|
||||||
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
g_return_if_fail (CLUTTER_IS_STAGE (stage));
|
||||||
g_return_if_fail ((width > 0) && (height > 0));
|
g_return_if_fail ((width > 0) && (height > 0));
|
||||||
@ -2356,19 +2356,17 @@ clutter_stage_set_minimum_size (ClutterStage *stage,
|
|||||||
return;
|
return;
|
||||||
|
|
||||||
resize = FALSE;
|
resize = FALSE;
|
||||||
clutter_actor_get_size (CLUTTER_ACTOR (stage),
|
_clutter_stage_window_get_geometry (stage->priv->impl, &geom);
|
||||||
¤t_width,
|
|
||||||
¤t_height);
|
|
||||||
|
|
||||||
if ((guint)current_width < width)
|
if (geom.width < width)
|
||||||
resize = TRUE;
|
resize = TRUE;
|
||||||
else
|
else
|
||||||
width = (guint)current_width;
|
width = geom.width;
|
||||||
|
|
||||||
if ((guint)current_height < height)
|
if (geom.height < height)
|
||||||
resize = TRUE;
|
resize = TRUE;
|
||||||
else
|
else
|
||||||
height = (guint)current_height;
|
height = geom.height;
|
||||||
|
|
||||||
if (resize)
|
if (resize)
|
||||||
_clutter_stage_window_resize (stage->priv->impl, width, height);
|
_clutter_stage_window_resize (stage->priv->impl, width, height);
|
||||||
|
Loading…
Reference in New Issue
Block a user