Path: utzoo!attcan!uunet!husc6!uwvax!oddjob!ncar!ames!pasteur!ucbvax!hplabs!hp-pcd!hpcvlx!fred From: fred@hpcvlx.HP.COM (Fred Taft) Newsgroups: comp.windows.x Subject: Re: HP's Xtk Bug Fixes Message-ID: <1610038@hpcvlx.HP.COM> Date: 15 Aug 88 18:12:41 GMT References: <1610032@hpcvlx.HP.COM> Organization: Hewlett-Packard Co., Corvallis, OR, USA Lines: 38 ### bug number: 549 ### area: Xt ### severity: low ### comments: VERSION: Xtk Release 2 SYNOPSIS: Xtk will not allow a widget (during its phase 2 destroy) to destroy another, unrelated, widget. DESCRIPTION: As XtNextEvent() currently implements the second phase of the destory process, it is not possible for a widget being destroyed to in turn initiate a destroy on another, unrelated widget (using XtDestroyWidget()). The problem arises because XtNextEvent() takes the current DestroyList, performs all of the callbacks, and then NULLs out the DestroyList; any new entries on the DestroyList are lost. REPEAT-BY: Destroy a widget whose Destroy routine then attempts to destroy another widget. FIX: Changing XtNextEvent() to perform the following, will fix the bug: while (DestroyList != NULL) { CallbackList currentList = DestroyList; DestroyList = NULL; _XtCallCallbacks (¤tList, (caddr_t), NULL); _XtRemoveAllCallbacks (¤tList); }