From a9bef610898cbe9762c7a982f5e84c00e5339b56 Mon Sep 17 00:00:00 2001 From: "robbin.marcus" Date: Wed, 19 Oct 2022 12:18:46 +0200 Subject: [PATCH] Early return for clang compile Changed functions names to be in line with other glfw functions --- CONTRIBUTORS.md | 1 + README.md | 3 +++ include/GLFW/glfw3.h | 4 ++-- src/win32_window.c | 3 ++- src/window.c | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/CONTRIBUTORS.md b/CONTRIBUTORS.md index 110ed4cd..c0a46b3b 100644 --- a/CONTRIBUTORS.md +++ b/CONTRIBUTORS.md @@ -260,6 +260,7 @@ video tutorials. - Jonas Ådahl - Lasse Öörni - Leonard König + - Robbin Marcus - All the unmentioned and anonymous contributors in the GLFW community, for bug reports, patches, feedback, testing and encouragement diff --git a/README.md b/README.md index 8b4a1546..e8ceda43 100644 --- a/README.md +++ b/README.md @@ -121,6 +121,9 @@ information on what to include when reporting a bug. ## Changelog + - Added `glfwSetWindowCaptionArea` to define caption for borderless windows (#1420) + - Added `glfwSetWindowResizeBorderSize` to set the resize area on borders for + resizing borderless windows (#1420) - Added `GLFW_PLATFORM` init hint for runtime platform selection (#1958) - Added `GLFW_ANY_PLATFORM`, `GLFW_PLATFORM_WIN32`, `GLFW_PLATFORM_COCOA`, `GLFW_PLATFORM_WAYLAND`, `GLFW_PLATFORM_X11` and `GLFW_PLATFORM_NULL` symbols to diff --git a/include/GLFW/glfw3.h b/include/GLFW/glfw3.h index 50c91501..6f3de7c2 100644 --- a/include/GLFW/glfw3.h +++ b/include/GLFW/glfw3.h @@ -3936,7 +3936,7 @@ GLFWAPI void glfwResizeWindow(GLFWwindow* window, int border); * * @ingroup window */ -GLFWAPI void glfwWindowSetCaptionArea(GLFWwindow* window, int offsetX, int offsetY, int sizeX, int sizeY); +GLFWAPI void glfwSetWindowCaptionArea(GLFWwindow* window, int offsetX, int offsetY, int sizeX, int sizeY); /*! @brief Sets the resize border size for the specified window. * @@ -3952,7 +3952,7 @@ GLFWAPI void glfwWindowSetCaptionArea(GLFWwindow* window, int offsetX, int offse * * @ingroup window */ -GLFWAPI void glfwWindowSetResizeBorderSize(GLFWwindow* window, int size); +GLFWAPI void glfwSetWindowResizeBorderSize(GLFWwindow* window, int size); /*! @brief Requests user attention to the specified window. * diff --git a/src/win32_window.c b/src/win32_window.c index 38e00a38..c64af5d1 100644 --- a/src/win32_window.c +++ b/src/win32_window.c @@ -1894,7 +1894,8 @@ void _glfwResizeWindowWin32(_GLFWwindow* window, int border) wBorder = HTBOTTOMRIGHT; break; default: - assert(GLFW_FALSE); + assert(GLFW_FALSE); + return; } ReleaseCapture(); SendMessage(window->win32.handle, WM_NCLBUTTONDOWN, wBorder, 0); diff --git a/src/window.c b/src/window.c index 74acd311..7fc2a42a 100644 --- a/src/window.c +++ b/src/window.c @@ -875,7 +875,7 @@ GLFWAPI void glfwResizeWindow(GLFWwindow* handle, int border) _glfw.platform.resizeWindow(window, border); } -GLFWAPI void glfwWindowSetCaptionArea(GLFWwindow* handle, int offsetX, int offsetY, int sizeX, int sizeY) +GLFWAPI void glfwSetWindowCaptionArea(GLFWwindow* handle, int offsetX, int offsetY, int sizeX, int sizeY) { _GLFWwindow* window = (_GLFWwindow*)handle; assert(window != NULL); @@ -891,7 +891,7 @@ GLFWAPI void glfwWindowSetCaptionArea(GLFWwindow* handle, int offsetX, int offse window->captionSizeY = sizeY; } -GLFWAPI void glfwWindowSetResizeBorderSize(GLFWwindow* handle, int size) +GLFWAPI void glfwSetWindowResizeBorderSize(GLFWwindow* handle, int size) { _GLFWwindow* window = (_GLFWwindow*)handle; assert(window != NULL);