summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWolfgang Ulbrich <chat-to-me@raveit.de>2016-01-11 20:38:24 +0100
committerWolfgang Ulbrich <chat-to-me@raveit.de>2016-01-13 15:07:35 +0100
commit2c8e8a06a050d43d730475bf05cbd07508f32160 (patch)
treee1b9a399da2fec5b0c7ce91a126931d8ac00cd69
parent43e928f798eec8035a00ab9f58a0bc43a31f8ab8 (diff)
downloadcaja-2c8e8a06a050d43d730475bf05cbd07508f32160.tar.bz2
caja-2c8e8a06a050d43d730475bf05cbd07508f32160.tar.xz
GTK3 icon-container: don't chain up style-updated for the desktop container
Chaining up resets the background to the default color, which is not what we want for the desktop container. Fixes https://github.com/mate-desktop/caja/issues/445 taken from: https://git.gnome.org/browse/nautilus/commit/?id=83a7d27
-rw-r--r--libcaja-private/caja-icon-container.c17
1 files changed, 14 insertions, 3 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index 40a02167..066da73f 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -4689,10 +4689,21 @@ style_updated (GtkWidget *widget)
{
CajaIconContainer *container;
- GTK_WIDGET_CLASS (caja_icon_container_parent_class)->style_updated (widget);
-
container = CAJA_ICON_CONTAINER (widget);
container->details->use_drop_shadows = container->details->drop_shadows_requested;
+
+ /* Don't chain up to parent, if this is a desktop container,
+ * because that resets the background of the window.
+ */
+ if (!caja_icon_container_get_is_desktop (container)) {
+ GTK_WIDGET_CLASS (caja_icon_container_parent_class)->style_updated (widget);
+ }
+
+ if (gtk_widget_get_realized (widget))
+ {
+ invalidate_label_sizes (container);
+ caja_icon_container_request_update_all (container);
+ }
#else
style_set (GtkWidget *widget,
GtkStyle *previous_style)
@@ -4709,7 +4720,6 @@ style_set (GtkWidget *widget,
container->details->use_drop_shadows = container->details->drop_shadows_requested && !frame_text;
caja_icon_container_theme_changed (CAJA_ICON_CONTAINER (widget));
-#endif
if (gtk_widget_get_realized (widget))
{
@@ -4719,6 +4729,7 @@ style_set (GtkWidget *widget,
/* Don't chain up to parent, because that sets the background of the window and we're doing
that ourself with some delay, so this would cause flickering */
+#endif
}
static gboolean