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 /tests | |
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 'tests')
-rw-r--r-- | tests/testgtk.c | 37 |
1 files changed, 22 insertions, 15 deletions
diff --git a/tests/testgtk.c b/tests/testgtk.c index 56dc6cb136..2992265063 100644 --- a/tests/testgtk.c +++ b/tests/testgtk.c @@ -5064,12 +5064,15 @@ void create_ctree (void) gtk_widget_realize (window); - pixmap1 = gdk_pixmap_create_from_xpm_d (window->window, &mask1, - &transparent, book_closed_xpm); - pixmap2 = gdk_pixmap_create_from_xpm_d (window->window, &mask2, - &transparent, book_open_xpm); - pixmap3 = gdk_pixmap_create_from_xpm_d (window->window, &mask3, - &transparent, mini_page_xpm); + if (!pixmap1) + pixmap1 = gdk_pixmap_create_from_xpm_d (window->window, &mask1, + &transparent, book_closed_xpm); + if (!pixmap2) + pixmap2 = gdk_pixmap_create_from_xpm_d (window->window, &mask2, + &transparent, book_open_xpm); + if (!pixmap3) + pixmap3 = gdk_pixmap_create_from_xpm_d (window->window, &mask3, + &transparent, mini_page_xpm); gtk_widget_set_usize (GTK_WIDGET (ctree), 0, 300); @@ -6157,14 +6160,16 @@ create_notebook (void) gtk_container_set_border_width (GTK_CONTAINER (sample_notebook), 10); gtk_widget_realize (sample_notebook); - book_open = gdk_pixmap_create_from_xpm_d (sample_notebook->window, - &book_open_mask, - transparent, - book_open_xpm); - book_closed = gdk_pixmap_create_from_xpm_d (sample_notebook->window, - &book_closed_mask, + if (!book_open) + book_open = gdk_pixmap_create_from_xpm_d (sample_notebook->window, + &book_open_mask, transparent, - book_closed_xpm); + book_open_xpm); + if (!book_closed) + book_closed = gdk_pixmap_create_from_xpm_d (sample_notebook->window, + &book_closed_mask, + transparent, + book_closed_xpm); create_pages (GTK_NOTEBOOK (sample_notebook), 1, 5); @@ -6748,8 +6753,10 @@ shape_create_icon (char *xpm_file, gtk_fixed_put (GTK_FIXED (fixed), pixmap, px,py); gtk_widget_show (pixmap); - gtk_widget_shape_combine_mask (window, gdk_pixmap_mask, px,py); - + gtk_widget_shape_combine_mask (window, gdk_pixmap_mask, px, py); + + gdk_drawable_unref (gdk_pixmap_mask); + gdk_drawable_unref (gdk_pixmap); gtk_signal_connect (GTK_OBJECT (window), "button_press_event", GTK_SIGNAL_FUNC (shape_pressed),NULL); |