Yesterday I've got strange issue: the desktop was repainting each 30 seconds or so. If I happen to be on another "virtual desktop" (and application in fullscreen mode) at this moment, I was switched to the main screen (that screen with dock on it). Very annoying.
The issue was connected to Google Drive application. I've clicked it's icon in the top menu, then chosen "Quit" and this behaviour disappeared.