Allowed drops from less privileged processes.

By default, UAC will prevent less privileged processes from sending
these messages.  This resolves that on Windows 7 and later.  Windows
Vista is still affected by this issue, as it has UAC but lacks
ChangeWindowMessageFilterEx.

Fixes #227.
This commit is contained in:
Camilla Berglund
2014-02-10 15:03:23 +01:00
parent 6fef0f1351
commit cf177905e5
3 changed files with 29 additions and 0 deletions
+10
View File
@@ -901,6 +901,16 @@ static int createWindow(_GLFWwindow* window,
free(wideTitle);
if (_glfw_ChangeWindowMessageFilterEx)
{
_glfw_ChangeWindowMessageFilterEx(window->win32.handle,
WM_DROPFILES, MSGFLT_ALLOW, NULL);
_glfw_ChangeWindowMessageFilterEx(window->win32.handle,
WM_COPYDATA, MSGFLT_ALLOW, NULL);
_glfw_ChangeWindowMessageFilterEx(window->win32.handle,
WM_COPYGLOBALDATA, MSGFLT_ALLOW, NULL);
}
DragAcceptFiles(window->win32.handle, TRUE);
if (!window->win32.handle)