How to re-attach this piece?

Can't you just take the thing out of the door, weld it and put it back in. Seems like the easiest way to me.

By the looks of it, that would require disassembling the inner workings of the door/window assembly. Definitely not the easiest way to handle this. There isn't a huge load on this bracket. A couple small tacks will work great.