Question: The steps here were simple, but unexpected:

1. download a file
2. in finder, rename the file using Keyboard:
	1. Press `Enter` to start rename
	2. Start typing a new name (but not pressing `Enter` again)
3. Try to open the file by pressing `Command`-`O`

Now this dialog appears and won't go away (it only reacts on moving with the mouse, but clicking on it fails, just as pressing `Spacebar`, `Enter` or `Esc`).

Both Finder and Spotlight now refuse to open any other file.

I tried:

```
killall -KILL Dock
killall -KILL Finder
killall -KILL NotificationCenter
killall -KILL SystemUIServer

```

Help (:

Note the file is not damaged, just renamed.

![enter image description here](https://i.stack.imgur.com/UpPuv.png)

Answer: 
Search for [OS X identify process by window](https://www.google.com/search?q=OS%20X%20identify%20process%20by%20window) I found [What process owns a certain window (Mac OS X)](http://blog.loudhush.ro/2014/04/what-process-owns-certain-window-mac-os.html) which told me this after moving the Window:

```
RetinaMBPro1TB:bin jeroenp$ ./show-recently-moved-windows.py 
Move target window

List of windows that moved:
{(
        {
        kCGWindowAlpha = 1;
        kCGWindowBounds =         {
            Height = 1094;
            Width = 1130;
            X = 43;
            Y = 45;
        };
        kCGWindowIsOnscreen = 1;
        kCGWindowLayer = 0;
        kCGWindowMemoryUsage = 5246548;
        kCGWindowName = "bin \U2014 Python \U2014 160\U00d776";
        kCGWindowNumber = 23921;
        kCGWindowOwnerName = Terminal;
        kCGWindowOwnerPID = 357;
        kCGWindowSharingState = 1;
        kCGWindowStoreType = 2;
    },
        {
        kCGWindowAlpha = 1;
        kCGWindowBounds =         {
            Height = 153;
            Width = 420;
            X = 1359;
            Y = 182;
        };
        kCGWindowIsOnscreen = 1;
        kCGWindowLayer = 8;
        kCGWindowMemoryUsage = 390292;
        kCGWindowName = "";
        kCGWindowNumber = 23246;
        kCGWindowOwnerName = CoreServicesUIAgent;
        kCGWindowOwnerPID = 87976;
        kCGWindowSharingState = 1;
        kCGWindowStoreType = 2;
    }
)}

```

Since [`CoreServicesUIAgent`](https://www.google.com/search?q=CoreServicesUIAgent) is the owner, I performed this:

```
killall -KILL CoreServicesUIAgent

```

That worked. Now I can open the PDF again.
The icon in the dialog box is the clue. It's something to do with Gatekeeper. This article from Apple <https://support.apple.com/en-au/HT202491> might help.