Import some fixes from MC for x11-wm/metacity3