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 - [GTK3] Theme is not loaded in other WM's (MATE, XFCE and so)
Summary: [GTK3] Theme is not loaded in other WM's (MATE, XFCE and so)
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Fedora
Classification: Fedora
Component: firefox
Version: 19
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Martin Stransky
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-02-13 14:46 UTC by Martin Stransky
Modified: 2014-02-13 15:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-02-13 15:23:07 UTC


Attachments (Terms of Use)

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


Note You need to log in before you can comment on or make changes to this bug.