summaryrefslogtreecommitdiff
path: root/libcaja-private/caja-icon-container.c
diff options
context:
space:
mode:
authorAlexei Sorokin <[email protected]>2017-03-12 15:07:16 +0300
committerraveit65 <[email protected]>2017-03-13 10:28:08 +0100
commit4c10ec0fdac58498c8c9616b940ff78990c86c90 (patch)
tree7cd24f21ef9f150fd7a565e255e3ea2e7dafb8c8 /libcaja-private/caja-icon-container.c
parent438682bef1a8fea49b4c6972350bede1bfad69d0 (diff)
downloadcaja-4c10ec0fdac58498c8c9616b940ff78990c86c90.tar.bz2
caja-4c10ec0fdac58498c8c9616b940ff78990c86c90.tar.xz
eel: Avoid deprecated gdk_window_set_background functions
Fixes partially #506, fixes compiz-reloaded/compiz#40.
Diffstat (limited to 'libcaja-private/caja-icon-container.c')
-rw-r--r--libcaja-private/caja-icon-container.c17
1 files changed, 15 insertions, 2 deletions
diff --git a/libcaja-private/caja-icon-container.c b/libcaja-private/caja-icon-container.c
index f6021900..75ecefc0 100644
--- a/libcaja-private/caja-icon-container.c
+++ b/libcaja-private/caja-icon-container.c
@@ -185,8 +185,6 @@ static void end_renaming_mode (CajaIconCon
gboolean commit);
static CajaIcon *get_icon_being_renamed (CajaIconContainer *container);
static void finish_adding_new_icons (CajaIconContainer *container);
-static void update_label_color (EelBackground *background,
- CajaIconContainer *icon_container);
static inline void icon_get_bounding_box (CajaIcon *icon,
int *x1_return,
int *y1_return,
@@ -4520,6 +4518,18 @@ size_allocate (GtkWidget *widget,
}
}
+static gboolean
+draw (GtkWidget *widget, cairo_t *cr)
+{
+ if (!CAJA_ICON_CONTAINER (widget)->details->is_desktop)
+ {
+ eel_background_draw (widget, cr);
+ }
+
+ return GTK_WIDGET_CLASS (caja_icon_container_parent_class)->draw (widget,
+ cr);
+}
+
static void
realize (GtkWidget *widget)
{
@@ -4529,12 +4539,14 @@ realize (GtkWidget *widget)
GTK_WIDGET_CLASS (caja_icon_container_parent_class)->realize (widget);
container = CAJA_ICON_CONTAINER (widget);
+#if !GTK_CHECK_VERSION (3, 22, 0)
/* Ensure that the desktop window is native so the background
set on it is drawn by X. */
if (container->details->is_desktop)
{
gdk_x11_window_get_xid (gtk_layout_get_bin_window (GTK_LAYOUT (widget)));
}
+#endif
/* Set up DnD. */
caja_icon_dnd_init (container);
@@ -6507,6 +6519,7 @@ caja_icon_container_class_init (CajaIconContainerClass *class)
widget_class = GTK_WIDGET_CLASS (class);
widget_class->size_allocate = size_allocate;
+ widget_class->draw = draw;
widget_class->realize = realize;
widget_class->unrealize = unrealize;
widget_class->button_press_event = button_press_event;