From 3a8c2ffb377efcf6628b0ecb1b07bc744efd8159 Mon Sep 17 00:00:00 2001 From: Doug Binks Date: Sat, 8 Sep 2018 18:01:28 +0200 Subject: [PATCH] Added Wayland _glfwPlatformGetMonitorWorkarea implementation using full monitor position and size. --- src/wl_monitor.c | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/wl_monitor.c b/src/wl_monitor.c index 24b0b39a7..f8b9e395f 100644 --- a/src/wl_monitor.c +++ b/src/wl_monitor.c @@ -153,6 +153,18 @@ void _glfwPlatformGetMonitorPos(_GLFWmonitor* monitor, int* xpos, int* ypos) *ypos = monitor->wl.y; } +void _glfwPlatformGetMonitorWorkarea(_GLFWmonitor* monitor, int* xpos, int* ypos, int *width, int *height) +{ + if (xpos) + *xpos = monitor->wl.x; + if (ypos) + *ypos = monitor->wl.y; + if (width) + *width = monitor->modes[monitor->wl.currentMode].width; + if (height) + *height = monitor->modes[monitor->wl.currentMode].height; +} + GLFWvidmode* _glfwPlatformGetVideoModes(_GLFWmonitor* monitor, int* found) { *found = monitor->modeCount;