Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.

Bug 1064922

Summary: [GTK3] Theme is not loaded in other WM's (MATE, XFCE and so)
Product: [Fedora] Fedora Reporter: Martin Stransky <stransky>
Component: firefoxAssignee: Martin Stransky <stransky>
Status: CLOSED UPSTREAM QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 19CC: gecko-bugs-nobody
Target Milestone: ---   
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-02-13 15:23:07 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

Description Martin Stransky 2014-02-13 14:46:06 UTC
When other than gnome-shell environment is run, Firefox gets wrong colors from css styles.

The attached patch fixes it because reloads the theme, but it's that a correct solution?

char *theme;
GtkSettings *settings = gtk_settings_get_default();
g_object_get (settings,
              "gtk-theme-name", &theme,
               nullptr);

GtkCssProvider *provider = gtk_css_provider_get_named(theme, NULL);
GdkScreen *screen = gdk_screen_get_default();
gtk_style_context_add_provider_for_screen(screen,
                                          GTK_STYLE_PROVIDER(provider),
                                          GTK_STYLE_PROVIDER_PRIORITY_USER);

Comment 1 Martin Stransky 2014-02-13 14:49:34 UTC
Note: Native gtk3 apps works as expected. Maybe I miss some initialization step.

Comment 2 Martin Stransky 2014-02-13 15:08:10 UTC
https://bugzilla.gnome.org/show_bug.cgi?id=696428, call gtk_settings_get_for_screen() is enough.

Comment 3 Martin Stransky 2014-02-13 15:23:07 UTC
https://bugzilla.mozilla.org/show_bug.cgi?id=972382