After rotate the screen, the calling sequence in compiz is as following: PrivateScreen::configure -> PrivateScreen::reshape -> PrivateScreen::detectOutputDevices -> PrivateScreen::updateOutputDevices In updateOutputDevices, screen->width() and screen->height() are reversed, which caused the problem. If the screen size should be updated in reshape(), it seems that the width/height of the configure event in this case are not correct. So is it a bug of X server? As a workaround, my original patch can be changed to update screen size only when the screen width is less then the output width or the screen height is less then the output height. 2011/9/1 Sam Spilsbury