From 0ea193c4e28cff1a17fd832ae761ea7da6e17850 Mon Sep 17 00:00:00 2001 From: Camilla Berglund Date: Tue, 23 Feb 2016 11:27:33 +0100 Subject: [PATCH] Fix detection of Win32 software monitor events Fixes #53. --- README.md | 2 ++ src/win32_window.c | 11 +++-------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/README.md b/README.md index 49939a97..f9469332 100644 --- a/README.md +++ b/README.md @@ -98,6 +98,8 @@ does not find Doxygen, the documentation will not be generated. - [Win32] Bugfix: MinGW import library lacked the `lib` prefix - [Win32] Bugfix: Monitor connection and disconnection events were not reported when no windows existed + - [Win32] Bugfix: Activating or deactivating displays in software did not + trigger monitor callback - [Cocoa] Removed support for OS X 10.6 - [Cocoa] Bugfix: Full screen windows on secondary monitors were mispositioned - [Cocoa] Bugfix: Connecting a joystick that reports no name would segfault diff --git a/src/win32_window.c b/src/win32_window.c index b2c627d2..2c3914d6 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -264,15 +264,10 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, break; } - case WM_DEVICECHANGE: + case WM_DISPLAYCHANGE: { - if (wParam == DBT_DEVNODES_CHANGED) - { - _glfwInputMonitorChange(); - return TRUE; - } - - break; + _glfwInputMonitorChange(); + return 0; } }