Dry rot top, rotted thread, and dry rot glue. The fix is to replace the panel that the window is attached to because a new window come pre attached to that section of top. If the window is that bad I highly recommend having the whole top replaced at one time. The top can be bought new for about 500. But I highly stress unless you have a wide selection of tools and are a decently skilled mechanic, just pay the fee for someone else to do it. Its a long difficult process, took me three days morning to night and a whole lot of cussing to finish.
On top of that I was quoted around 1200-1400 to have a professional install a new top, that's parts labor the whole shebang. If you mess up the top you buy and have to buy another one that's 1000 right there out of pocket. Its not just plug and play there's a lot of measuring and cutting of the new top fabric to make it work.
Had I known now what I know, and if it ever needs to be done again, I will gladly hand over 1400 to a professional. Its well worth it.