summaryrefslogtreecommitdiff
path: root/libnautilus-private/nautilus-icon-container.c
diff options
context:
space:
mode:
Diffstat (limited to 'libnautilus-private/nautilus-icon-container.c')
-rw-r--r--libnautilus-private/nautilus-icon-container.c16
1 files changed, 7 insertions, 9 deletions
diff --git a/libnautilus-private/nautilus-icon-container.c b/libnautilus-private/nautilus-icon-container.c
index a1d342b07..660627f18 100644
--- a/libnautilus-private/nautilus-icon-container.c
+++ b/libnautilus-private/nautilus-icon-container.c
@@ -206,10 +206,6 @@ enum {
};
static guint signals[LAST_SIGNAL];
-/* Bitmap for stippled selection rectangles. */
-static GdkBitmap *stipple;
-static char stipple_bits[] = { 0x02, 0x01 };
-
/* Functions dealing with NautilusIcons. */
static void
@@ -2482,6 +2478,7 @@ static void
realize (GtkWidget *widget)
{
GtkWindow *window;
+ GdkBitmap *stipple;
GTK_WIDGET_CLASS (parent_class)->realize (widget);
@@ -2491,6 +2488,11 @@ realize (GtkWidget *widget)
g_assert (GTK_IS_WINDOW (gtk_widget_get_toplevel (widget)));
window = GTK_WINDOW (gtk_widget_get_toplevel (widget));
gtk_window_set_focus (window, widget);
+
+ stipple = eel_stipple_bitmap_for_screen (
+ gdk_drawable_get_screen (GDK_DRAWABLE (widget->window)));
+
+ nautilus_icon_dnd_set_stipple (NAUTILUS_ICON_CONTAINER (widget), stipple);
}
static void
@@ -3471,10 +3473,6 @@ nautilus_icon_container_class_init (NautilusIconContainerClass *class)
widget_class->style_set = style_set;
widget_class->expose_event = expose_event;
- /* Initialize the stipple bitmap. */
-
- stipple = gdk_bitmap_create_from_data (NULL, stipple_bits, 2, 2);
-
eel_preferences_add_auto_enum (NAUTILUS_PREFERENCES_CLICK_POLICY,
&click_policy_auto_value);
@@ -3518,7 +3516,7 @@ nautilus_icon_container_instance_init (NautilusIconContainer *container)
container->details = details;
/* Set up DnD. */
- nautilus_icon_dnd_init (container, stipple);
+ nautilus_icon_dnd_init (container, NULL);
/* Make sure that we find out if the icons change. */
g_signal_connect_object