Recently, I have noticed that on most applications I have on Ubuntu 16.04, when I load the application, the window is displayed with a strange multi-coloured border (see the images below). If I maximise the window though, the border disappears and the window is displayed as expected.
This started happening for no apparent reason. If I reboot my machine, things return to normal at first, but after a while the problem comes back.
The issue occurs on most applications, including Nautilus, Software Centre, Terminal, System Settings, etc... I also get the same border appearing when I right click on the desktop, with the border surrounding the pop-up menu.
However, I have noticed that it does not happen on Chrome, but it does happen on other applications which did not come with Ubuntu by default.
Any ideas on what is causing the problem? Thanks!