Index: ChangeLog =================================================================== RCS file: /cvsroot/xforms/xforms/ChangeLog,v retrieving revision 1.89 diff -u -p -r1.89 ChangeLog --- ChangeLog 20 Apr 2004 15:25:11 -0000 1.89 +++ ChangeLog 20 Apr 2004 15:56:11 -0000 @@ -1,3 +1,9 @@ +2004-04-20 Jean-Marc Lasgouttes + + * lib/xpopup.c (fl_freepup): do not free unallocated entries + (fl_setpup_maxpup): do not forget to reset parent and window in + newly created menu_rec entries + 2004-04-19 Jean-Marc Lasgouttes * demos/Makefile.am (glwin_LDADD, gl_LDADD): fix ordering of Index: lib/xpopup.c =================================================================== RCS file: /cvsroot/xforms/xforms/lib/xpopup.c,v retrieving revision 1.10 diff -u -p -r1.10 xpopup.c --- lib/xpopup.c 21 Nov 2003 13:23:23 -0000 1.10 +++ lib/xpopup.c 20 Apr 2004 15:56:11 -0000 @@ -1158,9 +1158,8 @@ fl_freepup(int n) return; } - for (i = 0; i < FL_MAXPUPI; i++) + for (i = 0; i < p->nitems; i++) { - if (p->item[i]) { if (p->item[i]->subm >= 0 && p->isEntry) @@ -1601,16 +1600,7 @@ fl_showpup(int n) xswa.event_mask = m->event_mask; xswa.save_under = True; xswa.backing_store = WhenMapped; /* fl_cntl.backingStore; */ - xswa.cursor = m->cursor; /* fl_get_cursor_byname(XC_sb_right_arrow)); - - - - - - - - - */ + xswa.cursor = m->cursor; /* fl_get_cursor_byname(XC_sb_right_arrow)); */ wmask = CWEventMask | CWSaveUnder | CWCursor | CWBackingStore; xswa.border_pixel = 0; @@ -1798,6 +1788,8 @@ fl_setpup_maxpup(int n) { menu_rec[i].title = 0; menu_rec[i].item[0] = 0; + menu_rec[i].parent = 0; + menu_rec[i].win = 0; } return fl_maxpup = n;