This question has 2 answers here they are :
1) Do you mind if I close the window please?
2) Do you mind closing the window please?