Fix undefined function pointer usage found by clang sanitizer

This commit is contained in:
Kovid Goyal
2024-03-14 11:47:56 +05:30
parent a839af04dc
commit 6c49066cde
5 changed files with 6 additions and 10 deletions

View File

@@ -285,7 +285,7 @@ def generate_wrappers(glfw_header: str) -> None:
int glfwCocoaSetBackgroundBlur(GLFWwindow *w, int blur_radius)
bool glfwSetX11WindowBlurred(GLFWwindow *w, bool enable_blur)
void* glfwGetX11Display(void)
int32_t glfwGetX11Window(GLFWwindow* window)
unsigned long glfwGetX11Window(GLFWwindow* window)
void glfwSetPrimarySelectionString(GLFWwindow* window, const char* string)
void glfwCocoaSetWindowChrome(GLFWwindow* window, unsigned int color, bool use_system_color, unsigned int system_color,\
int background_blur, unsigned int hide_window_decorations, bool show_text_in_titlebar, int color_space, float background_opacity, bool resizable)

3
glfw/x11_window.c vendored
View File

@@ -41,7 +41,6 @@
#include <stdlib.h>
#include <limits.h>
#include <errno.h>
#include <assert.h>
// Action for EWMH client messages
#define _NET_WM_STATE_REMOVE 0
@@ -3227,7 +3226,7 @@ GLFWAPI Display* glfwGetX11Display(void)
return _glfw.x11.display;
}
GLFWAPI Window glfwGetX11Window(GLFWwindow* handle)
GLFWAPI unsigned long glfwGetX11Window(GLFWwindow* handle)
{
_GLFWwindow* window = (_GLFWwindow*) handle;
_GLFW_REQUIRE_INIT_OR_RETURN(None);