I make Scry, a screenshot app for the Mac. One of its tools is scroll capture: you draw a box around part of a page, and Scry scrolls that page and stitches one long image.
For a while it had a bug that looked random. You drew the box over a web page, and Scry scrolled its own Library window instead. Sometimes it scrolled the Settings window. Never the page you asked for.
The cause was one line I had added on purpose.
The line that raised everything
The capture overlay is a borderless, full-screen, transparent window. To take key and receive keystrokes, the app has to be active, so the overlay called:
NSApp . activate ( ignoringOtherApps : true )
Enter fullscreen mode
Exit fullscreen mode
That does make the overlay key. It also orders every ordinary window of the app above every other app. With a transparent overlay covering the whole screen, nobody sees it happen.…