mike@cfdl.larc.nasa.gov (Mike Walker) (01/06/90)
X Window System Bug Report xbugs@expo.lcs.mit.edu VERSION: R4 CLIENT MACHINE and OPERATING SYSTEM: Sun 3/280 running Sun UNIX 3.4 DISPLAY TYPE: Sun bwtwo WINDOW MANAGER: twm AREA: twm SYNOPSIS: f.nexticonmgr and f.previconmgr loop forever when there is no icon manager showing. DESCRIPTION: In function JumpIconManager in .../twm/iconmgr.c under the F_NEXTICONMGR case, the fragment: ... while (!got_it) { /* we have to go looking for one on another screen or * wrap around on this screen */ for (screen = (ip->scr->screen+1); ; screen++) { if (screen >= NumScreens) screen = 0; sp = ScreenList[screen]; for (tmp_ip = &(sp->iconmgr); tmp_ip != NULL; tmp_ip = tmp_ip->next) { if (tmp_ip->count != 0 && tmp_ip->twm_win->mapped) { /* we've got one */ got_it = TRUE; break; } } if (got_it) break; } } ``assumes'' you will always find a match. If the icon manager is hidden, that assumption is wrong, and you end up in an infinite loop. The case for finding the previous icon manager behaves similarly. REPEAT BY: Add menu entries for warping to the next and previous icon manger to your .twmrc: Menu "Twm Ops" { "Show IconMgr" f.showiconmgr "Hide IconMgr" f.hideiconmgr "Next IconMgr" f.nexticonmgr "Previous IconMgr" f.previconmgr } bind the menu to a button: Button1 = : root : f.menu "Twm Ops" restart twm, and use the next/previous iconmgr selections. When the icon manger is showing, they work. When it is hidden, twm enters an infinite loop. SAMPLE FIX: Don't do that :-) Seriously, should this do nothing, bring up the icon manager for the next screen, or what? Mike -- Mike Walker AS&M Inc/NASA LaRC Voice: (804) 864-2305 Fax: (804) 864-6134