diff options
author | Bastien Nocera <hadess@hadess.net> | 2022-02-01 21:57:18 +0100 |
---|---|---|
committer | Bastien Nocera <hadess@hadess.net> | 2022-02-02 16:53:37 +0100 |
commit | 2dd9166e2f2a3f33a5740c04f9d7ce6a03ba0709 (patch) | |
tree | 54e66cb8e66f5b5b37ca2731108cd1b714d794dd | |
parent | 6d9e44bfa4c81537857791fead4ff925c895788f (diff) | |
download | totem-2dd9166e2f2a3f33a5740c04f9d7ce6a03ba0709.tar.gz |
main: Fix warning starting remote application
(totem:2268540): Gtk-CRITICAL **: 21:59:00.013: gtk_style_context_add_provider_for_screen: assertion 'GDK_IS_SCREEN (screen)' failed
(totem:2268540): GLib-GObject-WARNING **: 21:59:00.013: invalid (NULL) pointer instance
etc.
Fixes: a784629f446f024bc585a9484fd0e119f7f28fcb
-rw-r--r-- | src/totem-object.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/src/totem-object.c b/src/totem-object.c index bd8fde913..d1c82e6f2 100644 --- a/src/totem-object.c +++ b/src/totem-object.c @@ -257,7 +257,6 @@ totem_object_app_handle_local_options (GApplication *application, GVariantDict *options) { GError *error = NULL; - HdyStyleManager *style_manager; if (!g_application_register (application, NULL, &error)) { g_warning ("Failed to register application: %s", error->message); @@ -265,9 +264,13 @@ totem_object_app_handle_local_options (GApplication *application, return 1; } - hdy_init (); - style_manager = hdy_style_manager_get_default (); - hdy_style_manager_set_color_scheme (style_manager, HDY_COLOR_SCHEME_FORCE_DARK); + if (!g_application_get_is_remote (application)) { + HdyStyleManager *style_manager; + + hdy_init (); + style_manager = hdy_style_manager_get_default (); + hdy_style_manager_set_color_scheme (style_manager, HDY_COLOR_SCHEME_FORCE_DARK); + } totem_options_process_for_server (TOTEM_OBJECT (application), &optionstate); return 0; |