Now you explained what you mean with "saving" I could test how it behaves with me in Windows 10.
- If I close a window (via the X in the top right corner) containing an instance of Notepad with a new file (that is, a file not saved earlier), the window (and the program) stay open after the file is given a name and saved.
- If I close a window (via that X) containing an instance of Notepad with an existing file (that is, a file saved earlier), the window (and the program) closes after the file is saved.
Apparently, the dialog window asking a filename influences the working of the X in the main window. Note: I didn't test what happens if I use File>Save As after pressing the X.
So the workaround for you seems to be to save it once yourself with File>Save (can be immediately after opening) to prevent this dialog window to appear. Works with me.
I didn't test how this works in Windows 7, but if you say it works differently, I'll surely believe you. And I'm afraid only Microsoft can tell what they changed (the behavior of a window or the behavior of Notepad) in Windows 10 and why.
An easy test, however, might be to run the WIndows 10 notepad.exe in WIndows 7, and the Windows 7 notepad.exe in Windows 10. Then you know.
Can you tell us, once you know?
Did you know the three buttons in the top right of a Window (minimize, (un)maximize, close) primarily work on the window, not on the program in the window. So it's as least as likely to be not a Notepad issue as it is to be a Notepad issue. You would have to compare with other programs, preferably a non-Microsoft program for which you can install the same version in different OS'es.
Post was last edited on January 29, 2018 2:55 PM PST