Platform: Windows 7
Emacs version: 24.2.1
Steps to reproduce this bug:
emacs -Q
copy and paste the next line into the *scratch* buffer:
(x-file-dialog "hi" "c:\\")
C-x C-e to evaluate it.
The dialog appears.
Type "abc" (without the enclosing double quotes) in the "File name" field.
Click the "Desktop" icon on the left side of the dialog.
Click the "Open" button.
The dialog does NOT disappear while it should.
I have tried GetOpenFileName/GetSaveFileName in my own Win32 programs and found that this behavior is casued by GetOpenFileName and GetSaveFileName is OK in such situation. However, simply replacing GetOpenFileName with GetSaveFileName will break other code in x-file-dialog.