clutter/stage: Remove 'minimum window size' logic

It was a feature relevant for when Clutter was an application toolkit
that wanted the application window to communicate a minimum size to the
windowing system.

Now, clutter is part of the windowing system component, so this feature
doesn't make any sense, so remove it.

Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/2002>
This commit is contained in:
Jonas Ådahl
2021-09-17 11:55:39 +02:00
committed by Marge Bot
parent 259a906b8c
commit 7058013660
3 changed files with 2 additions and 137 deletions

View File

@ -80,26 +80,16 @@ meta_stage_x11_fix_window_size (MetaStageX11 *stage_x11,
int new_width,
int new_height)
{
MetaStageImpl *stage_impl = META_STAGE_IMPL (stage_x11);
g_return_if_fail (new_width > 0);
g_return_if_fail (new_height > 0);
if (stage_x11->xwin != None)
{
Display *xdisplay = meta_clutter_x11_get_default_display ();
uint32_t min_width, min_height;
XSizeHints *size_hints;
size_hints = XAllocSizeHints();
clutter_stage_get_minimum_size (stage_impl->wrapper,
&min_width,
&min_height);
if (new_width <= 0)
new_width = min_width;
if (new_height <= 0)
new_height = min_height;
size_hints->min_width = new_width;
size_hints->min_height = new_height;
size_hints->max_width = new_width;

View File

@ -71,10 +71,6 @@ test_stage_sizing_main (int argc, char *argv[])
clutter_actor_add_child (rect, label);
clutter_actor_add_child (box, rect);
clutter_stage_set_minimum_size (CLUTTER_STAGE (stage),
clutter_actor_get_width (box),
clutter_actor_get_height (box));
clutter_actor_show (stage);
clutter_test_main ();