[comp.windows.x] pushing buttons too fast confuses R4 twm

idallen@watcgl.waterloo.edu (01/11/90)

From: "Ian! D. Allen [CGL]" <idallen>

I wrote this twm function and bound it to, say, F10:

    Function "foo"
    {
	f.iconify
	f.downiconmgr
	f.iconify
    }

What I had hoped it would do is walk down a twm icon manager full of
unmapped windows and, on each F10 press, close the currently open
window and bring up the next unmapped window in turn.  What I find it does
is bring up windows but does not close them.  As I walk down the icon
manager, it shows entries with the little (x) in them, indicating the
window is unmapped, but the window is still on the screen.

If I bind f.iconify and f.downiconmgr to their own buttons and slowly
alternate buttons, it works fine.  I find if I alternate buttons rapidly,
that too confuses twm into incorrect behaviour where the (x) boxes in the
icon manager show windows as being closed when they are actually still mapped.

I've written other twm functions that show the same sort of problem --
things that warp the cursor immediately followed by, say, a zoom will
often cause the wrong window to get hit by the zoom.  It's as if I
need to put a little "f.sleep" between the lines of the twm functions!

Anyone else seen this?  I'll submit a more formal bug report later.

jim@EXPO.LCS.MIT.EDU (Jim Fulton) (01/11/90)

I suspect that the f.function code doesn't try to update the context (i.e.
window, root, icon, etc.) between each individual f. call.