Win32: Fix monitor event emission

Fixes #784.
This commit is contained in:
Camilla Löwy 2017-03-14 19:21:52 +01:00
parent 0df9cc2fc5
commit 97dbd8b63b
3 changed files with 8 additions and 8 deletions

View File

@ -166,6 +166,7 @@ information on what to include when reporting a bug.
- [Win32] Bugfix: The 32-bit Vulkan loader library static was not searched for
- [Win32] Bugfix: Vulkan libraries have a new path as of SDK 1.0.42.0 (#956)
- [Win32] Bugfix: Monitors with no display devices were not enumerated (#960)
- [Win32] Bugfix: Monitor events were not emitted (#784)
- [X11] Replaced `_GLFW_HAS_XF86VM` compile-time option with dynamic loading
- [X11] Bugfix: `glfwGetVideoMode` would segfault on Cygwin/X
- [X11] Bugfix: Dynamic X11 library loading did not use full sonames (#941)

View File

@ -307,10 +307,10 @@ static HWND createHelperWindow(void)
MSG msg;
HWND window = CreateWindowExW(WS_EX_OVERLAPPEDWINDOW,
_GLFW_WNDCLASSNAME,
L"GLFW helper window",
L"GLFW message window",
WS_CLIPSIBLINGS | WS_CLIPCHILDREN,
0, 0, 1, 1,
HWND_MESSAGE, NULL,
NULL, NULL,
GetModuleHandleW(NULL),
NULL);
if (!window)

View File

@ -467,14 +467,13 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg,
switch (uMsg)
{
case WM_DISPLAYCHANGE:
_glfwPollMonitorsWin32();
break;
case WM_DEVICECHANGE:
{
if (wParam == DBT_DEVNODES_CHANGED)
{
_glfwPollMonitorsWin32();
return TRUE;
}
else if (wParam == DBT_DEVICEARRIVAL)
if (wParam == DBT_DEVICEARRIVAL)
{
DEV_BROADCAST_HDR* dbh = (DEV_BROADCAST_HDR*) lParam;
if (dbh)