GTK LaF does not switch system color scheme with Gnome on the fly

XMLWordPrintable

    • Type: Bug
    • Resolution: Unresolved
    • Priority: P4
    • tbd
    • Affects Version/s: 27
    • Component/s: client-libs
    • None

      On systems affected by JDK-8365313, jdk does not detect color scheme change on the fly (e.g. dark to light)

      Normally we would subscribe to changed::color-scheme signal to detect this change:

      static void on_color_scheme_changed(GSettings *settings, gchar *key, gpointer user_data) {
          gchar *value = g_settings_get_string(settings, key);
          g_print("Color scheme changed: %s\n", value);
          g_free(value);
      }
      ...
      GSettings *settings = g_settings_new("org.gnome.desktop.interface");
      g_signal_connect(settings, "changed::color-scheme", G_CALLBACK(on_color_scheme_changed), NULL);
      ...
      g_object_unref(settings);


      however it requires a gtk loop running(which we do not have).

      As a workaround, we could try finding a place in our code where we can check for a color scheme change to avoid introducing the GTK loop.

            Assignee:
            Alexander Zvegintsev
            Reporter:
            Alexander Zvegintsev
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: