|
|
|
@ -434,7 +434,7 @@ static int getKeyMods(void) |
|
|
|
|
static void fitToMonitor(_GLFWwindow* window) |
|
|
|
|
{ |
|
|
|
|
MONITORINFO mi = { sizeof(mi) }; |
|
|
|
|
GetMonitorInfo(window->monitor->win32.handle, &mi); |
|
|
|
|
GetMonitorInfoW(window->monitor->win32.handle, &mi); |
|
|
|
|
SetWindowPos(window->win32.handle, HWND_TOPMOST, |
|
|
|
|
mi.rcMonitor.left, |
|
|
|
|
mi.rcMonitor.top, |
|
|
|
@ -453,8 +453,8 @@ static void acquireMonitor(_GLFWwindow* window) |
|
|
|
|
|
|
|
|
|
// HACK: When mouse trails are enabled the cursor becomes invisible when
|
|
|
|
|
// the OpenGL ICD switches to page flipping
|
|
|
|
|
SystemParametersInfo(SPI_GETMOUSETRAILS, 0, &_glfw.win32.mouseTrailSize, 0); |
|
|
|
|
SystemParametersInfo(SPI_SETMOUSETRAILS, 0, 0, 0); |
|
|
|
|
SystemParametersInfoW(SPI_GETMOUSETRAILS, 0, &_glfw.win32.mouseTrailSize, 0); |
|
|
|
|
SystemParametersInfoW(SPI_SETMOUSETRAILS, 0, 0, 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
if (!window->monitor->window) |
|
|
|
@ -477,7 +477,7 @@ static void releaseMonitor(_GLFWwindow* window) |
|
|
|
|
SetThreadExecutionState(ES_CONTINUOUS); |
|
|
|
|
|
|
|
|
|
// HACK: Restore mouse trail length saved in acquireMonitor
|
|
|
|
|
SystemParametersInfo(SPI_SETMOUSETRAILS, _glfw.win32.mouseTrailSize, 0, 0); |
|
|
|
|
SystemParametersInfoW(SPI_SETMOUSETRAILS, _glfw.win32.mouseTrailSize, 0, 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
_glfwInputMonitorWindow(window->monitor, NULL); |
|
|
|
@ -492,8 +492,8 @@ static void maximizeWindowManually(_GLFWwindow* window) |
|
|
|
|
DWORD style; |
|
|
|
|
MONITORINFO mi = { sizeof(mi) }; |
|
|
|
|
|
|
|
|
|
GetMonitorInfo(MonitorFromWindow(window->win32.handle, |
|
|
|
|
MONITOR_DEFAULTTONEAREST), &mi); |
|
|
|
|
GetMonitorInfoW(MonitorFromWindow(window->win32.handle, |
|
|
|
|
MONITOR_DEFAULTTONEAREST), &mi); |
|
|
|
|
|
|
|
|
|
rect = mi.rcWork; |
|
|
|
|
|
|
|
|
@ -1126,7 +1126,7 @@ static LRESULT CALLBACK windowProc(HWND hWnd, UINT uMsg, |
|
|
|
|
|
|
|
|
|
ZeroMemory(&mi, sizeof(mi)); |
|
|
|
|
mi.cbSize = sizeof(mi); |
|
|
|
|
GetMonitorInfo(mh, &mi); |
|
|
|
|
GetMonitorInfoW(mh, &mi); |
|
|
|
|
|
|
|
|
|
mmi->ptMaxPosition.x = mi.rcWork.left - mi.rcMonitor.left; |
|
|
|
|
mmi->ptMaxPosition.y = mi.rcWork.top - mi.rcMonitor.top; |
|
|
|
@ -1392,7 +1392,7 @@ static int createNativeWindow(_GLFWwindow* window, |
|
|
|
|
if (wndconfig->maximized && !wndconfig->decorated) |
|
|
|
|
{ |
|
|
|
|
MONITORINFO mi = { sizeof(mi) }; |
|
|
|
|
GetMonitorInfo(mh, &mi); |
|
|
|
|
GetMonitorInfoW(mh, &mi); |
|
|
|
|
|
|
|
|
|
SetWindowPos(window->win32.handle, HWND_TOP, |
|
|
|
|
mi.rcWork.left, |
|
|
|
@ -1561,8 +1561,8 @@ void _glfwSetWindowIconWin32(_GLFWwindow* window, |
|
|
|
|
smallIcon = (HICON) GetClassLongPtrW(window->win32.handle, GCLP_HICONSM); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
SendMessage(window->win32.handle, WM_SETICON, ICON_BIG, (LPARAM) bigIcon); |
|
|
|
|
SendMessage(window->win32.handle, WM_SETICON, ICON_SMALL, (LPARAM) smallIcon); |
|
|
|
|
SendMessageW(window->win32.handle, WM_SETICON, ICON_BIG, (LPARAM) bigIcon); |
|
|
|
|
SendMessageW(window->win32.handle, WM_SETICON, ICON_SMALL, (LPARAM) smallIcon); |
|
|
|
|
|
|
|
|
|
if (window->win32.bigIcon) |
|
|
|
|
DestroyIcon(window->win32.bigIcon); |
|
|
|
@ -1831,7 +1831,7 @@ void _glfwSetWindowMonitorWin32(_GLFWwindow* window, |
|
|
|
|
|
|
|
|
|
acquireMonitor(window); |
|
|
|
|
|
|
|
|
|
GetMonitorInfo(window->monitor->win32.handle, &mi); |
|
|
|
|
GetMonitorInfoW(window->monitor->win32.handle, &mi); |
|
|
|
|
SetWindowPos(window->win32.handle, HWND_TOPMOST, |
|
|
|
|
mi.rcMonitor.left, |
|
|
|
|
mi.rcMonitor.top, |
|
|
|
@ -2128,7 +2128,7 @@ void _glfwWaitEventsTimeoutWin32(double timeout) |
|
|
|
|
|
|
|
|
|
void _glfwPostEmptyEventWin32(void) |
|
|
|
|
{ |
|
|
|
|
PostMessage(_glfw.win32.helperWindowHandle, WM_NULL, 0, 0); |
|
|
|
|
PostMessageW(_glfw.win32.helperWindowHandle, WM_NULL, 0, 0); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
void _glfwGetCursorPosWin32(_GLFWwindow* window, double* xpos, double* ypos) |
|
|
|
@ -2445,7 +2445,7 @@ VkResult _glfwCreateWindowSurfaceWin32(VkInstance instance, |
|
|
|
|
|
|
|
|
|
memset(&sci, 0, sizeof(sci)); |
|
|
|
|
sci.sType = VK_STRUCTURE_TYPE_WIN32_SURFACE_CREATE_INFO_KHR; |
|
|
|
|
sci.hinstance = GetModuleHandle(NULL); |
|
|
|
|
sci.hinstance = GetModuleHandleW(NULL); |
|
|
|
|
sci.hwnd = window->win32.handle; |
|
|
|
|
|
|
|
|
|
err = vkCreateWin32SurfaceKHR(instance, &sci, allocator, surface); |
|
|
|
|