Mysteriously, a rectangle has appeared in the middle of the screen. How to get rid of it?
Solution 1:
Steps to evaluate where it comes from.
Switch User to see if it is user specific
Restore Disk permissions.
Start in Safe mode to eliminate 3d party applications
It looks like it is a left over from some app that did not close properly, next time if it happens remember what app you just closed.
If problem persists, use Apple Hardware Test.
Solution 2:
A floating black rectangle appeared on my Mac screen after upgrade to High Sierra operating system. It is due to an Accessibility option and can be removed as follows:
System Preferences > Accessibility > Zoom > Options > Show preview rectangle when zoomed out
I do not know how it appeared, but I am glad that it is gone.
Solution 3:
I landed here looking for an answer and I ended up finding one myself. I had the same problem. I just used Command + Option + Escape to launch Force Quit, selected Finder and clicked on Relaunch. The rectangle disappeared and I could carry on with my life. :)