summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog5
-rw-r--r--src/nautilus-desktop-window.c119
2 files changed, 5 insertions, 119 deletions
diff --git a/ChangeLog b/ChangeLog
index cbe32cf90..60db4783f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2005-03-23 Alexander Larsson <alexl@redhat.com>
+
+ * src/nautilus-desktop-window.c:
+ Remove unused code. We avoid flicker in other ways.
+
2005-03-22 Alexander Larsson <alexl@redhat.com>
* configure.in:
diff --git a/src/nautilus-desktop-window.c b/src/nautilus-desktop-window.c
index fc09ac1c5..8d75e027e 100644
--- a/src/nautilus-desktop-window.c
+++ b/src/nautilus-desktop-window.c
@@ -146,128 +146,9 @@ finalize (GObject *object)
G_OBJECT_CLASS (parent_class)->finalize (object);
}
-/* Disable this code for the time being, since its:
- * a) not working
- * b) crashes nautilus if the root window has a different
- * depth than the nautilus window
- *
- * The idea behind the code is to grab the old background pixmap
- * and temporarily set it as the background for the nautilus window
- * to avoid flashing before the correct background has been set.
- */
-#if 0
-static void
-set_gdk_window_background (GdkWindow *window,
- gboolean have_pixel,
- Pixmap pixmap,
- gulong pixel)
-{
- Window w;
-
- w = GDK_WINDOW_XWINDOW (window);
-
- if (pixmap != None) {
- XSetWindowBackgroundPixmap (GDK_DISPLAY (), w,
- pixmap);
- } else if (have_pixel) {
- XSetWindowBackground (GDK_DISPLAY (), w,
- pixel);
- } else {
- XSetWindowBackgroundPixmap (GDK_DISPLAY (), w,
- None);
- }
-}
-
-static void
-set_window_background (GtkWidget *widget,
- gboolean already_have_root_bg,
- gboolean have_pixel,
- Pixmap pixmap,
- gulong pixel)
-{
- Atom type;
- gulong nitems, bytes_after;
- gint format;
- guchar *data;
-
- /* Set the background to show the root window to avoid a flash that
- * would otherwise occur.
- */
-
- if (GTK_IS_WINDOW (widget)) {
- gtk_widget_set_app_paintable (widget, TRUE);
- }
-
- if (!already_have_root_bg) {
- have_pixel = FALSE;
- already_have_root_bg = TRUE;
-
- /* We want to do this round-trip-to-server work only
- * for the first invocation, not on recursions
- */
-
- XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
- gdk_x11_get_xatom_by_name ("_XROOTPMAP_ID"),
- 0L, 1L, False, XA_PIXMAP,
- &type, &format, &nitems, &bytes_after,
- &data);
-
- if (type == XA_PIXMAP) {
- if (format == 32 && nitems == 1 && bytes_after == 0) {
- pixmap = *(Pixmap *) data;
- }
-
- XFree (data);
- }
-
- if (pixmap == None) {
- XGetWindowProperty (GDK_DISPLAY (), GDK_ROOT_WINDOW (),
- gdk_x11_get_xatom_by_name ("_XROOTCOLOR_PIXEL"),
- 0L, 1L, False, AnyPropertyType,
- &type, &format, &nitems, &bytes_after,
- &data);
-
- if (type != None) {
- if (format == 32 && nitems == 1 && bytes_after == 0) {
- pixel = *(gulong *) data;
- have_pixel = TRUE;
- }
-
- XFree (data);
- }
- }
- }
-
- set_gdk_window_background (widget->window,
- have_pixel, pixmap, pixel);
-
- if (GTK_IS_BIN (widget) &&
- GTK_BIN (widget)->child) {
- /* Ensure we're realized */
- gtk_widget_realize (GTK_BIN (widget)->child);
-
- set_window_background (GTK_BIN (widget)->child,
- already_have_root_bg, have_pixel,
- pixmap, pixel);
- }
-
- /* For both parent and child, if it's a layout then set on the
- * bin window as well.
- */
- if (GTK_IS_LAYOUT (widget)) {
- set_gdk_window_background (GTK_LAYOUT (widget)->bin_window,
- have_pixel,
- pixmap, pixel);
- }
-}
-#endif
static void
map (GtkWidget *widget)
{
- /* Disable for now, see above for comments */
-#if 0
- set_window_background (widget, FALSE, FALSE, None, 0);
-#endif
/* Chain up to realize our children */
GTK_WIDGET_CLASS (parent_class)->map (widget);
gdk_window_lower (widget->window);