win32: implement rtb_window_lock/unlock