This commit is contained in:
Camilla Berglund 2015-08-31 02:52:32 +02:00
parent f5cbdbab4f
commit 3dc53e21e5

View File

@ -717,9 +717,9 @@ static int createWindow(_GLFWwindow* window,
if (wndconfig->floating && !wndconfig->monitor) if (wndconfig->floating && !wndconfig->monitor)
{ {
SetWindowPos(window->win32.handle, SetWindowPos(window->win32.handle,
HWND_TOPMOST, HWND_TOPMOST,
0, 0, 0, 0, 0, 0, 0, 0,
SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE); SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOSIZE);
} }
DragAcceptFiles(window->win32.handle, TRUE); DragAcceptFiles(window->win32.handle, TRUE);
@ -991,7 +991,6 @@ int _glfwPlatformWindowVisible(_GLFWwindow* window)
void _glfwPlatformPollEvents(void) void _glfwPlatformPollEvents(void)
{ {
MSG msg; MSG msg;
_GLFWwindow* window;
while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE)) while (PeekMessageW(&msg, NULL, 0, 0, PM_REMOVE))
{ {
@ -1001,7 +1000,7 @@ void _glfwPlatformPollEvents(void)
// While GLFW does not itself post WM_QUIT, other processes may post // While GLFW does not itself post WM_QUIT, other processes may post
// it to this one, for example Task Manager // it to this one, for example Task Manager
window = _glfw.windowListHead; _GLFWwindow* window = _glfw.windowListHead;
while (window) while (window)
{ {
_glfwInputWindowCloseRequest(window); _glfwInputWindowCloseRequest(window);
@ -1015,9 +1014,10 @@ void _glfwPlatformPollEvents(void)
} }
} }
window = _glfw.cursorWindow; if (_glfw.cursorWindow)
if (window)
{ {
_GLFWwindow* window = _glfw.cursorWindow;
// LSHIFT/RSHIFT fixup (keys tend to "stick" without this fix) // LSHIFT/RSHIFT fixup (keys tend to "stick" without this fix)
// This is the only async event handling in GLFW, but it solves some // This is the only async event handling in GLFW, but it solves some
// nasty problems // nasty problems