Re: Updated unexpected window destruction patch.
- From: Owen Taylor <otaylor redhat com>
- To: gtk-devel-list redhat com
- Subject: Re: Updated unexpected window destruction patch.
- Date: 03 Sep 1999 15:12:35 -0400
Owen Taylor <otaylor@redhat.com> writes:
> int error_handler (Display *d, XErrorEvent *e)
> {
> if ((e->error_code == BadWindow) || (e->error_code == BadDrawable))
> {
> GdkWindow *window = gdk_window_lookup (e->resourceid);
>
> if (window)
> {
> if (!g_dataset_get_data (window, "bonobo-error"))
> {
> g_dataset_set_data_full (window, "bonobo-error",
> g_new (gint, 1),
> (GDestroyNotify)g_free);
Tim pointed out to me that using g_dataset_* directly here
is broken. I forgot that I had added accessors for
drawable data. So this should be:
gdk_drawable_set_data (window, "bonobo-error",
g_new (gint, 1), (GDestroyNotify)g_free);
So, if you use this technique, do it that way,
Owen
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]