mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
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:
@@ -77,6 +77,20 @@
|
||||
#ifndef WM_DWMCOMPOSITIONCHANGED
|
||||
#define WM_DWMCOMPOSITIONCHANGED 0x031E
|
||||
#endif
|
||||
#ifndef WM_COPYGLOBALDATA
|
||||
#define WM_COPYGLOBALDATA 0x0049
|
||||
#endif
|
||||
#ifndef MSGFLT_ALLOW
|
||||
#define MSGFLT_ALLOW 1
|
||||
#endif
|
||||
|
||||
#if defined(__MINGW32__)
|
||||
typedef struct tagCHANGEFILTERSTRUCT
|
||||
{
|
||||
DWORD cbSize;
|
||||
DWORD ExtStatus;
|
||||
} CHANGEFILTERSTRUCT, *PCHANGEFILTERSTRUCT;
|
||||
#endif /*__MINGW32__*/
|
||||
|
||||
|
||||
//========================================================================
|
||||
@@ -107,7 +121,9 @@ typedef DWORD (WINAPI * TIMEGETTIME_T) (void);
|
||||
|
||||
// user32.dll function pointer typedefs
|
||||
typedef BOOL (WINAPI * SETPROCESSDPIAWARE_T)(void);
|
||||
typedef BOOL (WINAPI * CHANGEWINDOWMESSAGEFILTEREX_T)(HWND,UINT,DWORD,PCHANGEFILTERSTRUCT);
|
||||
#define _glfw_SetProcessDPIAware _glfw.win32.user32.SetProcessDPIAware
|
||||
#define _glfw_ChangeWindowMessageFilterEx _glfw.win32.user32.ChangeWindowMessageFilterEx
|
||||
|
||||
// dwmapi.dll function pointer typedefs
|
||||
typedef HRESULT (WINAPI * DWMISCOMPOSITIONENABLED_T)(BOOL*);
|
||||
@@ -192,6 +208,7 @@ typedef struct _GLFWlibraryWin32
|
||||
struct {
|
||||
HINSTANCE instance;
|
||||
SETPROCESSDPIAWARE_T SetProcessDPIAware;
|
||||
CHANGEWINDOWMESSAGEFILTEREX_T ChangeWindowMessageFilterEx;
|
||||
} user32;
|
||||
|
||||
// dwmapi.dll
|
||||
|
||||
Reference in New Issue
Block a user