Both expressions are used.
However,
Do you mind if I open the window? (Polite and normal.)
Do you mind my opening the window? (Polite, educated.)
Do you mind me opening the window? (Polite, uneducated or partially educated.)