Patch by Brecht, with minor edits by myself, thanks a lot! Tech details: previous drag-resize handling code was based on the assumption that coords returned by ui_window_to_block() was relative to the bottom on the uiBlock. This is in fact completly eroneous, usually this func does not translate at all the coords, it merely rescale them - except for blocks inside panels, where returned values are relative to the left/bottom corner of the panel... Pretty confusing, solution for now is to store ref mouse position in window space, and convert them to block each time, just like current mouse pos.