Fix the resizing of CSD windows

Borrowed from [this Metacity commit](https://git.gnome.org/browse/metacity/commit/?id=c9099b4a90932a22c86b960c8b4dc7cd1458defe) which uses the code from [this Mutter commit](https://git.gnome.org/browse/mutter/commit/?id=526bc34bba20b5f8d3055f2fb668a36a21357443). :)

Fixes https://github.com/mate-desktop/marco/issues/138.