st: Adjust theme test
Mutter's Clutter fork can no longer be initialized separatedly, as its backend now draws from MetaBackend. Adjust the code to use the newly added test initialization function instead to get the test back up. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/691
This commit is contained in:
parent
8ac5be95d3
commit
957fa910b3
@ -136,7 +136,7 @@ libst_dep = declare_dependency(link_with: libst,
|
|||||||
test_theme = executable('test-theme',
|
test_theme = executable('test-theme',
|
||||||
sources: 'test-theme.c',
|
sources: 'test-theme.c',
|
||||||
c_args: st_cflags,
|
c_args: st_cflags,
|
||||||
dependencies: [clutter_dep, gtk_dep],
|
dependencies: [mutter_dep, gtk_dep],
|
||||||
build_rpath: mutter_typelibdir,
|
build_rpath: mutter_typelibdir,
|
||||||
link_with: libst
|
link_with: libst
|
||||||
)
|
)
|
||||||
|
@ -25,6 +25,7 @@
|
|||||||
#include "st-button.h"
|
#include "st-button.h"
|
||||||
#include <math.h>
|
#include <math.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
|
#include <meta/main.h>
|
||||||
|
|
||||||
static ClutterActor *stage;
|
static ClutterActor *stage;
|
||||||
static StThemeNode *root;
|
static StThemeNode *root;
|
||||||
@ -536,11 +537,16 @@ main (int argc, char **argv)
|
|||||||
StThemeContext *context;
|
StThemeContext *context;
|
||||||
PangoFontDescription *font_desc;
|
PangoFontDescription *font_desc;
|
||||||
GFile *file;
|
GFile *file;
|
||||||
|
g_autofree char *cwd = NULL;
|
||||||
|
|
||||||
gtk_init (&argc, &argv);
|
gtk_init (&argc, &argv);
|
||||||
|
|
||||||
if (clutter_init (&argc, &argv) != CLUTTER_INIT_SUCCESS)
|
/* meta_init() cds to $HOME */
|
||||||
return 1;
|
cwd = g_get_current_dir ();
|
||||||
|
|
||||||
|
meta_test_init ();
|
||||||
|
|
||||||
|
chdir (cwd);
|
||||||
|
|
||||||
/* Make sure our assumptions about resolution are correct */
|
/* Make sure our assumptions about resolution are correct */
|
||||||
g_object_set (clutter_settings_get_default (), "font-dpi", -1, NULL);
|
g_object_set (clutter_settings_get_default (), "font-dpi", -1, NULL);
|
||||||
|
Loading…
Reference in New Issue
Block a user