Firstly, it should be 'opening'. The second is a request, while the first is a question about whether someone objects generally to opening the window, and a bit of a strange way of asking it, I think. You could 'do you mind if I open the window?', if you want to do the opening.
