diff options
author | Owen Taylor <otaylor@redhat.com> | 2000-05-15 16:09:53 +0000 |
---|---|---|
committer | Owen Taylor <otaylor@src.gnome.org> | 2000-05-15 16:09:53 +0000 |
commit | 386ae2097042d60afa3c4d4d4244161d16966b77 (patch) | |
tree | 81f5b805d22e1cb86356b4e1c1b7be7ad4aab6b9 /gtk/gtkwidget.c | |
parent | 014e275b3ab5c4965eab02a19a77ec31b5002895 (diff) | |
download | gtk+-386ae2097042d60afa3c4d4d4244161d16966b77.tar.gz |
A bit of editing.
Fri May 12 18:46:51 2000 Owen Taylor <otaylor@redhat.com>
* docs/Changes-1.4.txt: A bit of editing.
* gdk/gdkwindow.c (_gdk_window_clear_update_area)
* gdk/x11/gdkwindow-x11.c (gdk_window_hide): Add a function
to clear the update area for the window, and clear it
when hiding a window.
* gdk/gdkwindow.c (gdk_window_begin_paint_region): Ignore
if window destroyed.
* gdk/gdkwindow.c (gdk_window_end_paint): Likewise.
* gdk/gdkwindow.c gdk/x11/gdkwindow-x11.c gdk/gdkinternals.h: Move
gdk_window_destroy() to the generic code, since there was a lot of
window-system-independent logic it in. Add a function:
_gdk_window_destroy()
to the internal API to destroy a window without unreferencing it.
Add a function:
_gdk_windowing_window_destroy()
That does the windowing-system-dependent part of destroying
the window.
Fri May 12 11:07:41 2000 Owen Taylor <otaylor@redhat.com>
* gtk/testgtk.c: Fix various memory leaks of pixmaps.
Fri May 12 11:06:10 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkwidget.c docs/Changes-1.4.txt (gtk_widget_shape_combine_mask):
Make gtk_widget_shape_combine_mask() keep a reference count on
the pixmap since it keeps it around.
Fri May 12 10:53:29 2000 Owen Taylor <otaylor@redhat.com>
* gdk/gdkwindow.c (gdk_window_process_updates_internal): Fix refcount
leak.
* gdk/x11/gdkevents-x11.c (gdk_event_translate): Fix refcount
leak with event filters.
Thu May 11 14:29:44 2000 Owen Taylor <otaylor@redhat.com>
* gtk/gtkdnd.c (gtk_drag_dest_set_internal): Remove the
signal handlers with the right data arguments. (Fixes
some warnings when a widget was repeatedly set as a drag
destination.)
* gdk/x11/gdkdnd-x11.c (gdk_window_register_dnd): Set data on the
window so we can avoid avoid setting the DND properties on the
toplevel window repeatedly.
Diffstat (limited to 'gtk/gtkwidget.c')
-rw-r--r-- | gtk/gtkwidget.c | 21 |
1 files changed, 12 insertions, 9 deletions
diff --git a/gtk/gtkwidget.c b/gtk/gtkwidget.c index c09e605e50..e30ca4aa67 100644 --- a/gtk/gtkwidget.c +++ b/gtk/gtkwidget.c @@ -4297,6 +4297,13 @@ gtk_widget_aux_info_destroy (GtkWidgetAuxInfo *aux_info) g_mem_chunk_free (aux_info_mem_chunk, aux_info); } +static void +gtk_widget_shape_info_destroy (GtkWidgetShapeInfo *info) +{ + gdk_drawable_unref (info->shape_mask); + g_free (info); +} + /***************************************** * gtk_widget_shape_combine_mask: * set a shape for this widgets' gdk window, this allows for @@ -4327,21 +4334,17 @@ gtk_widget_shape_combine_mask (GtkWidget *widget, if (widget->window) gdk_window_shape_combine_mask (widget->window, NULL, 0, 0); - shape_info = gtk_object_get_data (GTK_OBJECT (widget), shape_info_key); gtk_object_remove_data (GTK_OBJECT (widget), shape_info_key); - g_free (shape_info); } else { GTK_PRIVATE_SET_FLAG (widget, GTK_HAS_SHAPE_MASK); - shape_info = gtk_object_get_data (GTK_OBJECT (widget), shape_info_key); - if (!shape_info) - { - shape_info = g_new (GtkWidgetShapeInfo, 1); - gtk_object_set_data (GTK_OBJECT (widget), shape_info_key, shape_info); - } - shape_info->shape_mask = shape_mask; + shape_info = g_new (GtkWidgetShapeInfo, 1); + gtk_object_set_data_full (GTK_OBJECT (widget), shape_info_key, shape_info, + (GDestroyNotify)gtk_widget_shape_info_destroy); + + shape_info->shape_mask = gdk_drawable_ref (shape_mask); shape_info->offset_x = offset_x; shape_info->offset_y = offset_y; |