diff options
Diffstat (limited to 'src/app.c')
| -rw-r--r-- | src/app.c | 15 |
1 files changed, 15 insertions, 0 deletions
@@ -18,6 +18,10 @@ #include <glib.h> +#if GGAZE_HAVE_GEGL +#include <gegl.h> +#endif + struct _GgazeApp { AdwApplication parent_instance; }; @@ -41,6 +45,16 @@ ggaze_app_activate(GApplication *p_app) { } static void +ggaze_app_startup(GApplication *p_app) { + G_APPLICATION_CLASS(ggaze_app_parent_class)->startup(p_app); +#if GGAZE_HAVE_GEGL + /* Init GEGL once before any window is created (before the first enhance + * call). Idempotent if already initialised. */ + gegl_init(NULL, NULL); +#endif +} + +static void ggaze_app_open(GApplication *p_app, GFile **p_files, gint n_files, const gchar *c_hint) { (void)c_hint; @@ -62,6 +76,7 @@ ggaze_app_init(GgazeApp *p_app) { static void ggaze_app_class_init(GgazeAppClass *p_klass) { GApplicationClass *p_app_class = G_APPLICATION_CLASS(p_klass); + p_app_class->startup = ggaze_app_startup; p_app_class->activate = ggaze_app_activate; p_app_class->open = ggaze_app_open; } |
