st/test-theme: Use stage from mutter

Clutter application style stages not supported anymore.

https://gitlab.gnome.org/GNOME/gnome-shell/-/merge_requests/1359
This commit is contained in:
Jonas Ådahl 2020-07-09 22:14:15 +02:00
parent 2f840174cb
commit beddbc0583

View File

@ -26,6 +26,7 @@
#include <math.h>
#include <string.h>
#include <meta/main.h>
#include <meta/meta-backend.h>
static ClutterActor *stage;
static StThemeNode *root;
@ -533,6 +534,7 @@ test_inline_style (void)
int
main (int argc, char **argv)
{
MetaBackend *backend;
StTheme *theme;
StThemeContext *context;
PangoFontDescription *font_desc;
@ -556,7 +558,8 @@ main (int argc, char **argv)
theme = st_theme_new (file, NULL, NULL);
g_object_unref (file);
stage = clutter_stage_new ();
backend = meta_get_backend ();
stage = meta_backend_get_stage (backend);
context = st_theme_context_get_for_stage (CLUTTER_STAGE (stage));
st_theme_context_set_theme (context, theme);