x11: further improvement to get maxwidth/maxheight fully working.