]> Pileus Git - ~andy/gtk/commitdiff
Fixed some list-manipulation breakage.
authorOwen Taylor <otaylor@redhat.com>
Sat, 9 Jan 1999 00:21:37 +0000 (00:21 +0000)
committerOwen Taylor <otaylor@src.gnome.org>
Sat, 9 Jan 1999 00:21:37 +0000 (00:21 +0000)
Fri Jan  8 19:00:17 1999  Owen Taylor  <otaylor@redhat.com>

* gdk/gdkdnd.c (gdk_window_cache_filter): Fixed
some list-manipulation breakage.

* gdk/gdkdnd.c (gdk_window_cache_destroy): Free
window cache structure.

* gtk/gtkdnd.c (gtk_drag_set_icon_pixmap): Set an
event mask on the drag window so clicking on it
doesn't pop up root menus, etc.

* gtk/gtkdnd.c (gtk_drag_button_release_cb): Remove
signal handlers at button release.

ChangeLog
ChangeLog.pre-2-0
ChangeLog.pre-2-10
ChangeLog.pre-2-2
ChangeLog.pre-2-4
ChangeLog.pre-2-6
ChangeLog.pre-2-8
gdk/gdkdnd.c
gdk/x11/gdkdnd-x11.c
gtk/gtkdnd.c

index 7edc0e2fbedd92f0e288472a1839e54b2883a327..001d71527f8dd33250fec9b18c5445e7dd9d1111 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,18 @@
+Fri Jan  8 19:00:17 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkdnd.c (gdk_window_cache_filter): Fixed
+       some list-manipulation breakage.
+
+       * gdk/gdkdnd.c (gdk_window_cache_destroy): Free 
+       window cache structure.
+
+       * gtk/gtkdnd.c (gtk_drag_set_icon_pixmap): Set an
+       event mask on the drag window so clicking on it
+       doesn't pop up root menus, etc.
+
+       * gtk/gtkdnd.c (gtk_drag_button_release_cb): Remove
+       signal handlers at button release.
+
 Fri Jan  8 00:42:00 1999  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkspinbutton.c (gtk_spin_button_get_value_as_int)
index 7edc0e2fbedd92f0e288472a1839e54b2883a327..001d71527f8dd33250fec9b18c5445e7dd9d1111 100644 (file)
@@ -1,3 +1,18 @@
+Fri Jan  8 19:00:17 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkdnd.c (gdk_window_cache_filter): Fixed
+       some list-manipulation breakage.
+
+       * gdk/gdkdnd.c (gdk_window_cache_destroy): Free 
+       window cache structure.
+
+       * gtk/gtkdnd.c (gtk_drag_set_icon_pixmap): Set an
+       event mask on the drag window so clicking on it
+       doesn't pop up root menus, etc.
+
+       * gtk/gtkdnd.c (gtk_drag_button_release_cb): Remove
+       signal handlers at button release.
+
 Fri Jan  8 00:42:00 1999  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkspinbutton.c (gtk_spin_button_get_value_as_int)
index 7edc0e2fbedd92f0e288472a1839e54b2883a327..001d71527f8dd33250fec9b18c5445e7dd9d1111 100644 (file)
@@ -1,3 +1,18 @@
+Fri Jan  8 19:00:17 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkdnd.c (gdk_window_cache_filter): Fixed
+       some list-manipulation breakage.
+
+       * gdk/gdkdnd.c (gdk_window_cache_destroy): Free 
+       window cache structure.
+
+       * gtk/gtkdnd.c (gtk_drag_set_icon_pixmap): Set an
+       event mask on the drag window so clicking on it
+       doesn't pop up root menus, etc.
+
+       * gtk/gtkdnd.c (gtk_drag_button_release_cb): Remove
+       signal handlers at button release.
+
 Fri Jan  8 00:42:00 1999  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkspinbutton.c (gtk_spin_button_get_value_as_int)
index 7edc0e2fbedd92f0e288472a1839e54b2883a327..001d71527f8dd33250fec9b18c5445e7dd9d1111 100644 (file)
@@ -1,3 +1,18 @@
+Fri Jan  8 19:00:17 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkdnd.c (gdk_window_cache_filter): Fixed
+       some list-manipulation breakage.
+
+       * gdk/gdkdnd.c (gdk_window_cache_destroy): Free 
+       window cache structure.
+
+       * gtk/gtkdnd.c (gtk_drag_set_icon_pixmap): Set an
+       event mask on the drag window so clicking on it
+       doesn't pop up root menus, etc.
+
+       * gtk/gtkdnd.c (gtk_drag_button_release_cb): Remove
+       signal handlers at button release.
+
 Fri Jan  8 00:42:00 1999  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkspinbutton.c (gtk_spin_button_get_value_as_int)
index 7edc0e2fbedd92f0e288472a1839e54b2883a327..001d71527f8dd33250fec9b18c5445e7dd9d1111 100644 (file)
@@ -1,3 +1,18 @@
+Fri Jan  8 19:00:17 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkdnd.c (gdk_window_cache_filter): Fixed
+       some list-manipulation breakage.
+
+       * gdk/gdkdnd.c (gdk_window_cache_destroy): Free 
+       window cache structure.
+
+       * gtk/gtkdnd.c (gtk_drag_set_icon_pixmap): Set an
+       event mask on the drag window so clicking on it
+       doesn't pop up root menus, etc.
+
+       * gtk/gtkdnd.c (gtk_drag_button_release_cb): Remove
+       signal handlers at button release.
+
 Fri Jan  8 00:42:00 1999  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkspinbutton.c (gtk_spin_button_get_value_as_int)
index 7edc0e2fbedd92f0e288472a1839e54b2883a327..001d71527f8dd33250fec9b18c5445e7dd9d1111 100644 (file)
@@ -1,3 +1,18 @@
+Fri Jan  8 19:00:17 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkdnd.c (gdk_window_cache_filter): Fixed
+       some list-manipulation breakage.
+
+       * gdk/gdkdnd.c (gdk_window_cache_destroy): Free 
+       window cache structure.
+
+       * gtk/gtkdnd.c (gtk_drag_set_icon_pixmap): Set an
+       event mask on the drag window so clicking on it
+       doesn't pop up root menus, etc.
+
+       * gtk/gtkdnd.c (gtk_drag_button_release_cb): Remove
+       signal handlers at button release.
+
 Fri Jan  8 00:42:00 1999  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkspinbutton.c (gtk_spin_button_get_value_as_int)
index 7edc0e2fbedd92f0e288472a1839e54b2883a327..001d71527f8dd33250fec9b18c5445e7dd9d1111 100644 (file)
@@ -1,3 +1,18 @@
+Fri Jan  8 19:00:17 1999  Owen Taylor  <otaylor@redhat.com>
+
+       * gdk/gdkdnd.c (gdk_window_cache_filter): Fixed
+       some list-manipulation breakage.
+
+       * gdk/gdkdnd.c (gdk_window_cache_destroy): Free 
+       window cache structure.
+
+       * gtk/gtkdnd.c (gtk_drag_set_icon_pixmap): Set an
+       event mask on the drag window so clicking on it
+       doesn't pop up root menus, etc.
+
+       * gtk/gtkdnd.c (gtk_drag_button_release_cb): Remove
+       signal handlers at button release.
+
 Fri Jan  8 00:42:00 1999  Lars Hamann  <lars@gtk.org>
 
        * gtk/gtkspinbutton.c (gtk_spin_button_get_value_as_int)
index 728bdb7f5dc7591dd93e389273d5705ff677afa9..c3fdaa58bebe6401b22163504314b74856f8da9a 100644 (file)
@@ -1,5 +1,5 @@
 /* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ * Copyright (C) 1995-1999 Peter Mattis, Spencer Kimball and Josh MacDonald
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -244,6 +244,8 @@ gdk_window_cache_filter (GdkXEvent *xev,
                  {
                    cache->children = g_list_remove_link (cache->children, node);
                    node->next = above_node->next;
+                   if (node->next)
+                     node->next->prev = node;
                    node->prev = above_node;
                    above_node->next = node;
                  }
@@ -254,6 +256,7 @@ gdk_window_cache_filter (GdkXEvent *xev,
     case CreateNotify:
       {
        XCreateWindowEvent *xcwe = &xevent->xcreatewindow;
+
        if (!g_hash_table_lookup (cache->child_hash, 
                                  GUINT_TO_POINTER (xcwe->window))) 
          gdk_window_cache_add (cache, xcwe->window, 
@@ -378,6 +381,8 @@ gdk_window_cache_destroy (GdkWindowCache *cache)
   g_list_foreach (cache->children, (GFunc)g_free, NULL);
   g_list_free (cache->children);
   g_hash_table_destroy (cache->child_hash);
+
+  g_free (cache);
 }
 
 static Window
index 728bdb7f5dc7591dd93e389273d5705ff677afa9..c3fdaa58bebe6401b22163504314b74856f8da9a 100644 (file)
@@ -1,5 +1,5 @@
 /* GDK - The GIMP Drawing Kit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ * Copyright (C) 1995-1999 Peter Mattis, Spencer Kimball and Josh MacDonald
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -244,6 +244,8 @@ gdk_window_cache_filter (GdkXEvent *xev,
                  {
                    cache->children = g_list_remove_link (cache->children, node);
                    node->next = above_node->next;
+                   if (node->next)
+                     node->next->prev = node;
                    node->prev = above_node;
                    above_node->next = node;
                  }
@@ -254,6 +256,7 @@ gdk_window_cache_filter (GdkXEvent *xev,
     case CreateNotify:
       {
        XCreateWindowEvent *xcwe = &xevent->xcreatewindow;
+
        if (!g_hash_table_lookup (cache->child_hash, 
                                  GUINT_TO_POINTER (xcwe->window))) 
          gdk_window_cache_add (cache, xcwe->window, 
@@ -378,6 +381,8 @@ gdk_window_cache_destroy (GdkWindowCache *cache)
   g_list_foreach (cache->children, (GFunc)g_free, NULL);
   g_list_free (cache->children);
   g_hash_table_destroy (cache->child_hash);
+
+  g_free (cache);
 }
 
 static Window
index cb7df4d69593e89339872a3f9788d604183640f9..9dab1b40e6f10ecf5a3ad369834a89d9c141156d 100644 (file)
@@ -1,5 +1,5 @@
 /* GTK - The GIMP Toolkit
- * Copyright (C) 1995-1997 Peter Mattis, Spencer Kimball and Josh MacDonald
+ * Copyright (C) 1995-1999 Peter Mattis, Spencer Kimball and Josh MacDonald
  *
  * This library is free software; you can redistribute it and/or
  * modify it under the terms of the GNU Library General Public
@@ -1759,6 +1759,7 @@ gtk_drag_set_icon_pixmap  (GdkDragContext    *context,
   gtk_widget_push_colormap (colormap);
 
   window = gtk_window_new (GTK_WINDOW_POPUP);
+  gtk_widget_set_events (window, GDK_BUTTON_PRESS_MASK | GDK_BUTTON_RELEASE_MASK);
   gtk_widget_set_app_paintable (GTK_WIDGET (window), TRUE);
 
   gtk_widget_pop_visual ();
@@ -2334,7 +2335,6 @@ gtk_drag_source_info_destroy (gpointer data)
   if (info->widget)
     gtk_widget_unref (info->widget);
   
-  gtk_signal_disconnect_by_data (GTK_OBJECT (info->ipc_widget), info);
   gtk_selection_remove_all (info->ipc_widget);
   gtk_object_set_data (GTK_OBJECT (info->ipc_widget), "gtk-info", NULL);
   source_widgets = g_slist_remove (source_widgets, info->ipc_widget);
@@ -2459,6 +2459,7 @@ gtk_drag_button_release_cb (GtkWidget      *widget,
     }
 
   gtk_grab_remove (widget);
+  gtk_signal_disconnect_by_data (GTK_OBJECT (widget), info);
 
   /* Send on a release pair to the the original 
    * widget to convince it to release its grab. We need to