From a24fdf27f98f487aaf239cf02fc48a53f28e064e Mon Sep 17 00:00:00 2001 From: Felipe Ferreira da Silva Date: Thu, 6 Apr 2017 22:04:44 -0300 Subject: [PATCH] Update query for work area on Windows --- README.md | 1 + src/cocoa_monitor.m | 4 ++++ src/mir_monitor.c | 4 ++++ src/win32_monitor.c | 1 + 4 files changed, 10 insertions(+) diff --git a/README.md b/README.md index 155e5ae50..43bee345d 100644 --- a/README.md +++ b/README.md @@ -122,6 +122,7 @@ information on what to include when reporting a bug. ## Changelog +- Added `glfwGetMonitorWorkarea` function for querying the monitor work area - Added `glfwGetKeyScancode` function that allows retrieving platform dependent scancodes for keys (#830) - Added `glfwSetWindowMaximizeCallback` and `GLFWwindowmaximizefun` for diff --git a/src/cocoa_monitor.m b/src/cocoa_monitor.m index 41a6cff07..3dabf5845 100644 --- a/src/cocoa_monitor.m +++ b/src/cocoa_monitor.m @@ -360,6 +360,10 @@ void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) *ypos = (int) bounds.origin.y; } +void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height) +{ +} + GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* count) { CFArrayRef modes; diff --git a/src/mir_monitor.c b/src/mir_monitor.c index 268485064..acac51ad9 100644 --- a/src/mir_monitor.c +++ b/src/mir_monitor.c @@ -121,6 +121,10 @@ static void FillInRGBBitsFromPixelFormat(GLFWvidmode* mode, const MirPixelFormat } } +void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height) +{ +} + GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) { int i; diff --git a/src/win32_monitor.c b/src/win32_monitor.c index 1509c9520..8221bfb07 100644 --- a/src/win32_monitor.c +++ b/src/win32_monitor.c @@ -295,6 +295,7 @@ static BOOL CALLBACK MonitorEnumProc(HMONITOR hMonitor, HDC hdcMonitor, LPRECT l { RECT *workarea = (RECT *)dwData; MONITORINFO monitorInfo; + monitorInfo.cbSize = sizeof(MONITORINFO); GetMonitorInfo(hMonitor, &monitorInfo); workarea->left = monitorInfo.rcWork.left; workarea->top = monitorInfo.rcWork.top;