I like the idea of having this feature in st, and your patch is simple because you only move a function from one place to another, but could you explain a bit why moving the function from draw to xdraws makes w3mimgdisplay work?
Regards, -- Roberto E. Vargas Caballero