packages feed

bindings-GLFW 3.1.2.1 → 3.1.2.2

raw patch · 16 files changed

+178/−102 lines, 16 filesdep ~HUnitnew-uploader

Dependency ranges changed: HUnit

Files

README.md view
@@ -1,5 +1,8 @@ bindings-GLFW =============++## Description+ [![Hackage](https://img.shields.io/hackage/v/bindings-GLFW.svg)](http://hackage.haskell.org/package/bindings-GLFW)  Low-level [Haskell][1] bindings to [GLFW][2], an open source, multi-platform@@ -11,8 +14,26 @@ *These bindings are too low-level for normal use.* For higher-level GLFW bindings, see [GLFW-b][4]. +## Contributing++This package uses git-flow as development model, in short that means that:++1. New features should be added to "develop" branch.+2. "master" branch is reserved for stable releases.+3. Patches for bugs related with previous releases should always be done in+    "hotfixes" branch.+4. All merge commits to master from "hotfixes" should be done+    using the "--no-ff" flag and from "develop" should avoid merging commits.++Until we have a defined road-map we are going to leave out "release+"branches" and "feature branches". For more information about this development+model please refer to [this site.][5]++Thanks you, and happy coding.+ [1]: http://www.haskell.org/ [2]: http://www.glfw.org/ [3]: http://www.glfw.org/Version-3.1-released.html [4]: http://www.glfw.org/changelog.html [4]: https://github.com/bsl/GLFW-b+[5]: http://nvie.com/posts/a-successful-git-branching-model/
bindings-GLFW.cabal view
@@ -1,9 +1,11 @@ name:         bindings-GLFW-version:      3.1.2.1+version:      3.1.2.2 category:     Graphics  author:       Brian Lewis <brian@lorf.org>-maintainer:   Schell Scivally <efsubenovex@gmail.com>, Brian Lewis <brian@lorf.org>+maintainer:   Schell Scivally <efsubenovex@gmail.com>,+              Brian Lewis <brian@lorf.org>,+              Javier Jaramago <jaramago.fernandez.javier@gmail.com>  license:      BSD3 license-file: LICENSE@@ -211,7 +213,7 @@    build-depends:     bindings-GLFW,-    HUnit                == 1.2.*,+    HUnit                == 1.3.*,     base                  < 5,     test-framework       == 0.8.*,     test-framework-hunit == 0.3.*
glfw/include/GLFW/glfw3.h view
@@ -249,7 +249,7 @@  *  API changes.  *  @ingroup init  */-#define GLFW_VERSION_REVISION       0+#define GLFW_VERSION_REVISION       1 /*! @} */  /*! @name Key and button actions@@ -988,7 +988,7 @@  *  *  @param[in] window The window that received the event.  *  @param[in] count The number of dropped files.- *  @param[in] names The UTF-8 encoded path names of the dropped files.+ *  @param[in] paths The UTF-8 encoded file and/or directory path names.  *  *  @sa glfwSetDropCallback  *@@ -3136,7 +3136,7 @@ /*! @brief Sets the GLFW timer.  *  *  This function sets the value of the GLFW timer.  It then continues to count- *  up from that value.+ *  up from that value.  The value must be a positive finite number.  *  *  @param[in] time The new value, in seconds.  *@@ -3243,14 +3243,14 @@  *  @param[in] interval The minimum number of screen updates to wait for  *  until the buffers are swapped by @ref glfwSwapBuffers.  *- *  @note This function is not called during window creation, leaving the swap- *  interval set to whatever is the default on that platform.  This is done+ *  @remarks This function is not called during context creation, leaving the+ *  swap interval set to whatever is the default on that platform.  This is done  *  because some swap interval extensions used by GLFW do not allow the swap  *  interval to be reset to zero once it has been set to a non-zero value.  *- *  @note Some GPU drivers do not honor the requested swap interval, either- *  because of user settings that override the request or due to bugs in the- *  driver.+ *  @remarks Some GPU drivers do not honor the requested swap interval, either+ *  because of a user setting that overrides the application's request or due to+ *  bugs in the driver.  *  *  @par Thread Safety  *  This function may be called from any thread.@@ -3267,9 +3267,9 @@ /*! @brief Returns whether the specified extension is available.  *  *  This function returns whether the specified- *  [API extension](@ref context_glext) is supported by the current OpenGL or- *  OpenGL ES context.  It searches both for OpenGL and OpenGL ES extension and- *  platform-specific context creation API extensions.+ *  [client API extension](@ref context_glext) is supported by the current+ *  OpenGL or OpenGL ES context.  It searches both for OpenGL and OpenGL ES+ *  extension and platform-specific context creation API extensions.  *  *  A context must be current on the calling thread.  Calling this function  *  without a current context will cause a @ref GLFW_NO_CURRENT_CONTEXT error.@@ -3298,7 +3298,7 @@  *  context.  *  *  This function returns the address of the specified- *  [client API or extension function](@ref context_glext), if it is supported+ *  [core or extension function](@ref context_glext), if it is supported  *  by the current context.  *  *  A context must be current on the calling thread.  Calling this function@@ -3308,8 +3308,12 @@  *  @return The address of the function, or `NULL` if the function is  *  unavailable or an [error](@ref error_handling) occurred.  *- *  @note The addresses of a given function is not guaranteed to be the same+ *  @remarks The addresses of a given function is not guaranteed to be the same  *  between contexts.+ *+ *  @remarks This function may return a non-`NULL` address despite the+ *  associated version or extension not being available.  Always check the+ *  context version or extension string presence first.  *  *  @par Pointer Lifetime  *  The returned function pointer is valid until the context is destroyed or the
glfw/include/os/darwin/glfw_config.h view
@@ -62,6 +62,10 @@ // Define this to 1 to force use of high-performance GPU on Optimus systems /* #undef _GLFW_USE_OPTIMUS_HPG */ +// Define this to 1 if the XInput X11 extension is available+/* #undef _GLFW_HAS_XINPUT */+// Define this to 1 if the Xxf86vm X11 extension is available+/* #undef _GLFW_HAS_XF86VM */ // Define this to 1 if glXGetProcAddress is available /* #undef _GLFW_HAS_GLXGETPROCADDRESS */ // Define this to 1 if glXGetProcAddressARB is available
glfw/include/os/unix-like/glfw_config.h view
@@ -1,5 +1,5 @@ //========================================================================-// GLFW 3.0 - www.glfw.org+// GLFW 3.1 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2010 Camilla Berglund <elmindreda@elmindreda.org> //@@ -23,13 +23,15 @@ //    distribution. // //========================================================================-// As config.h.in, this file is used by CMake to produce the config.h shared-// configuration header file.  If you are adding a feature requiring-// conditional compilation, this is the proper place to add the macros.+// As glfw_config.h.in, this file is used by CMake to produce the+// glfw_config.h configuration header file.  If you are adding a feature+// requiring conditional compilation, this is where to add the macro. //========================================================================-// As config.h, this file defines compile-time build options and macros for-// all platforms supported by GLFW.  As this is a generated file, don't modify-// it.  Instead, you should modify the config.h.in file.+// As glfw_config.h, this file defines compile-time option macros for a+// specific platform and development environment.  If you are using the+// GLFW CMake files, modify glfw_config.h.in instead of this file.  If you+// are using your own build system, make this file define the appropriate+// macros in whatever way is suitable. //========================================================================  // Define this to 1 if building GLFW for X11@@ -38,6 +40,10 @@ /* #undef _GLFW_WIN32 */ // Define this to 1 if building GLFW for Cocoa /* #undef _GLFW_COCOA */+// Define this to 1 if building GLFW for Wayland+/* #undef _GLFW_WAYLAND */+// Define this to 1 if building GLFW for Mir+/* #undef _GLFW_MIR */  // Define this to 1 if building GLFW for EGL /* #undef _GLFW_EGL */@@ -51,17 +57,19 @@ // Define this to 1 if building as a shared library / dynamic library / DLL /* #undef _GLFW_BUILD_DLL */ -// Define this to 1 to disable dynamic loading of winmm-/* #undef _GLFW_NO_DLOAD_WINMM */ // Define this to 1 if glfwSwapInterval should ignore DWM compositing status /* #undef _GLFW_USE_DWM_SWAP_INTERVAL */ // Define this to 1 to force use of high-performance GPU on Optimus systems /* #undef _GLFW_USE_OPTIMUS_HPG */ +// Define this to 1 if the XInput X11 extension is available+#define _GLFW_HAS_XINPUT+// Define this to 1 if the Xxf86vm X11 extension is available+#define _GLFW_HAS_XF86VM // Define this to 1 if glXGetProcAddress is available #define _GLFW_HAS_GLXGETPROCADDRESS // Define this to 1 if glXGetProcAddressARB is available-/* #undef _GLFW_HAS_GLXGETPROCADDRESSARB */+#define _GLFW_HAS_GLXGETPROCADDRESSARB // Define this to 1 if glXGetProcAddressEXT is available /* #undef _GLFW_HAS_GLXGETPROCADDRESSEXT */ // Define this to 1 if dlopen is available@@ -71,6 +79,8 @@ /* #undef _GLFW_USE_CHDIR */ // Define this to 1 if glfwCreateWindow should populate the menu bar /* #undef _GLFW_USE_MENUBAR */+// Define this to 1 if windows should use full resolution on Retina displays+/* #undef _GLFW_USE_RETINA */  // Define this to 1 if using OpenGL as the client library #define _GLFW_USE_OPENGL@@ -78,7 +88,4 @@ /* #undef _GLFW_USE_GLESV1 */ // Define this to 1 if using OpenGL ES 2.0 as the client library /* #undef _GLFW_USE_GLESV2 */--// The GLFW version as used by glfwGetVersionString-#define _GLFW_VERSION_FULL "3.0.3" 
glfw/include/os/windows/glfw_config.h view
@@ -1,5 +1,5 @@ //========================================================================-// GLFW 3.0 - www.glfw.org+// GLFW 3.1 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2010 Camilla Berglund <elmindreda@elmindreda.org> //@@ -23,13 +23,15 @@ //    distribution. // //========================================================================-// As config.h.in, this file is used by CMake to produce the config.h shared-// configuration header file.  If you are adding a feature requiring-// conditional compilation, this is the proper place to add the macros.+// As glfw_config.h.in, this file is used by CMake to produce the+// glfw_config.h configuration header file.  If you are adding a feature+// requiring conditional compilation, this is where to add the macro. //========================================================================-// As config.h, this file defines compile-time build options and macros for-// all platforms supported by GLFW.  As this is a generated file, don't modify-// it.  Instead, you should modify the config.h.in file.+// As glfw_config.h, this file defines compile-time option macros for a+// specific platform and development environment.  If you are using the+// GLFW CMake files, modify glfw_config.h.in instead of this file.  If you+// are using your own build system, make this file define the appropriate+// macros in whatever way is suitable. //========================================================================  // Define this to 1 if building GLFW for X11@@ -38,6 +40,10 @@ #define _GLFW_WIN32 // Define this to 1 if building GLFW for Cocoa /* #undef _GLFW_COCOA */+// Define this to 1 if building GLFW for Wayland+/* #undef _GLFW_WAYLAND */+// Define this to 1 if building GLFW for Mir+/* #undef _GLFW_MIR */  // Define this to 1 if building GLFW for EGL /* #undef _GLFW_EGL */@@ -51,17 +57,19 @@ // Define this to 1 if building as a shared library / dynamic library / DLL /* #undef _GLFW_BUILD_DLL */ -// Define this to 1 to disable dynamic loading of winmm-/* #undef _GLFW_NO_DLOAD_WINMM */ // Define this to 1 if glfwSwapInterval should ignore DWM compositing status /* #undef _GLFW_USE_DWM_SWAP_INTERVAL */ // Define this to 1 to force use of high-performance GPU on Optimus systems /* #undef _GLFW_USE_OPTIMUS_HPG */ +// Define this to 1 if the XInput X11 extension is available+/* #undef _GLFW_HAS_XINPUT */+// Define this to 1 if the Xxf86vm X11 extension is available+/* #undef _GLFW_HAS_XF86VM */ // Define this to 1 if glXGetProcAddress is available-/* #undef _GLFW_HAS_GLXGETPROCADDRESS */+#define _GLFW_HAS_GLXGETPROCADDRESS // Define this to 1 if glXGetProcAddressARB is available-/* #undef _GLFW_HAS_GLXGETPROCADDRESSARB */+#define _GLFW_HAS_GLXGETPROCADDRESSARB // Define this to 1 if glXGetProcAddressEXT is available /* #undef _GLFW_HAS_GLXGETPROCADDRESSEXT */ // Define this to 1 if dlopen is available@@ -71,6 +79,8 @@ /* #undef _GLFW_USE_CHDIR */ // Define this to 1 if glfwCreateWindow should populate the menu bar /* #undef _GLFW_USE_MENUBAR */+// Define this to 1 if windows should use full resolution on Retina displays+/* #undef _GLFW_USE_RETINA */  // Define this to 1 if using OpenGL as the client library #define _GLFW_USE_OPENGL@@ -78,7 +88,4 @@ /* #undef _GLFW_USE_GLESV1 */ // Define this to 1 if using OpenGL ES 2.0 as the client library /* #undef _GLFW_USE_GLESV2 */--// The GLFW version as used by glfwGetVersionString-#define _GLFW_VERSION_FULL "3.0.3" 
glfw/src/cocoa_window.m view
@@ -592,17 +592,17 @@     if (count)     {         NSEnumerator* e = [files objectEnumerator];-        char** names = calloc(count, sizeof(char*));+        char** paths = calloc(count, sizeof(char*));         int i;          for (i = 0;  i < count;  i++)-            names[i] = strdup([[e nextObject] UTF8String]);+            paths[i] = strdup([[e nextObject] UTF8String]); -        _glfwInputDrop(window, count, (const char**) names);+        _glfwInputDrop(window, count, (const char**) paths);          for (i = 0;  i < count;  i++)-            free(names[i]);-        free(names);+            free(paths[i]);+        free(paths);     }      return YES;@@ -990,7 +990,10 @@  void _glfwPlatformSetWindowSize(_GLFWwindow* window, int width, int height) {-    [window->ns.object setContentSize:NSMakeSize(width, height)];+    if (window->monitor)+        enterFullscreenMode(window);+    else+        [window->ns.object setContentSize:NSMakeSize(width, height)]; }  void _glfwPlatformGetFramebufferSize(_GLFWwindow* window, int* width, int* height)
glfw/src/input.c view
@@ -28,6 +28,7 @@ #include "internal.h"  #include <stdlib.h>+#include <float.h> #if defined(_MSC_VER)  #include <malloc.h> #endif@@ -216,10 +217,10 @@         window->callbacks.cursorEnter((GLFWwindow*) window, entered); } -void _glfwInputDrop(_GLFWwindow* window, int count, const char** names)+void _glfwInputDrop(_GLFWwindow* window, int count, const char** paths) {     if (window->callbacks.drop)-        window->callbacks.drop((GLFWwindow*) window, count, names);+        window->callbacks.drop((GLFWwindow*) window, count, paths); }  @@ -591,6 +592,13 @@ GLFWAPI void glfwSetTime(double time) {     _GLFW_REQUIRE_INIT();++    if (time != time || time - DBL_MAX == time || time < 0.0)+    {+        _glfwInputError(GLFW_INVALID_VALUE, "Invalid time");+        return;+    }+     _glfwPlatformSetTime(time); } 
glfw/src/internal.h view
@@ -33,7 +33,7 @@  #include "glfw_config.h" #endif -#define _GLFW_VERSION_NUMBER "3.1.0"+#define _GLFW_VERSION_NUMBER "3.1.1"  #if defined(_GLFW_USE_OPENGL)  // This is the default for glfw3.h
glfw/src/linux_joystick.c view
@@ -277,11 +277,13 @@      regfree(&_glfw.linux_js.regex); -    if (_glfw.linux_js.watch > 0)-        close(_glfw.linux_js.watch);-     if (_glfw.linux_js.inotify > 0)+    {+        if (_glfw.linux_js.watch > 0)+            inotify_rm_watch(_glfw.linux_js.inotify, _glfw.linux_js.watch);+         close(_glfw.linux_js.inotify);+    } #endif // __linux__ } 
glfw/src/monitor.c view
@@ -32,10 +32,6 @@ #include <stdlib.h> #include <limits.h> -#if defined(_MSC_VER) || _WIN64-#include <malloc.h>-#define strdup _strdup-#endif  // Lexical comparison function for GLFW video modes, used by qsort //
glfw/src/win32_window.c view
@@ -584,7 +584,7 @@             int i;              const int count = DragQueryFileW(hDrop, 0xffffffff, NULL, 0);-            char** names = calloc(count, sizeof(char*));+            char** paths = calloc(count, sizeof(char*));              // Move the mouse to the position of the drop             DragQueryPoint(hDrop, &pt);@@ -596,16 +596,16 @@                 WCHAR* buffer = calloc(length + 1, sizeof(WCHAR));                  DragQueryFileW(hDrop, i, buffer, length + 1);-                names[i] = _glfwCreateUTF8FromWideString(buffer);+                paths[i] = _glfwCreateUTF8FromWideString(buffer);                  free(buffer);             } -            _glfwInputDrop(window, count, (const char**) names);+            _glfwInputDrop(window, count, (const char**) paths);              for (i = 0;  i < count;  i++)-                free(names[i]);-            free(names);+                free(paths[i]);+            free(paths);              DragFinish(hDrop);             return 0;
glfw/src/x11_init.c view
@@ -479,11 +479,13 @@                                            "_MOTIF_WM_HINTS",                                            False); +#if defined(_GLFW_HAS_XF86VM)     // Check for XF86VidMode extension     _glfw.x11.vidmode.available =         XF86VidModeQueryExtension(_glfw.x11.display,                                   &_glfw.x11.vidmode.eventBase,                                   &_glfw.x11.vidmode.errorBase);+#endif /*_GLFW_HAS_XF86VM*/      // Check for RandR extension     _glfw.x11.randr.available =@@ -535,6 +537,7 @@             _glfw.x11.xinerama.available = GL_TRUE;     } +#if defined(_GLFW_HAS_XINPUT)     if (XQueryExtension(_glfw.x11.display,                         "XInputExtension",                         &_glfw.x11.xi.majorOpcode,@@ -551,6 +554,7 @@             _glfw.x11.xi.available = GL_TRUE;         }     }+#endif /*_GLFW_HAS_XINPUT*/      // Check if Xkb is supported on this display     _glfw.x11.xkb.versionMajor = 1;@@ -583,7 +587,7 @@     detectEWMH();      // Find or create string format atoms-    _glfw.x11._NULL = XInternAtom(_glfw.x11.display, "NULL", False);+    _glfw.x11.NULL_ = XInternAtom(_glfw.x11.display, "NULL", False);     _glfw.x11.UTF8_STRING =         XInternAtom(_glfw.x11.display, "UTF8_STRING", False);     _glfw.x11.COMPOUND_STRING =
glfw/src/x11_monitor.c view
@@ -432,6 +432,7 @@          XRRFreeGamma(gamma);     }+#if defined(_GLFW_HAS_XF86VM)     else if (_glfw.x11.vidmode.available)     {         int size;@@ -443,6 +444,7 @@                                 _glfw.x11.screen,                                 ramp->size, ramp->red, ramp->green, ramp->blue);     }+#endif /*_GLFW_HAS_XF86VM*/ }  void _glfwPlatformSetGammaRamp(_GLFWmonitor* monitor, const GLFWgammaramp* ramp)@@ -458,6 +460,7 @@         XRRSetCrtcGamma(_glfw.x11.display, monitor->x11.crtc, gamma);         XRRFreeGamma(gamma);     }+#if defined(_GLFW_HAS_XF86VM)     else if (_glfw.x11.vidmode.available)     {         XF86VidModeSetGammaRamp(_glfw.x11.display,@@ -467,6 +470,7 @@                                 (unsigned short*) ramp->green,                                 (unsigned short*) ramp->blue);     }+#endif /*_GLFW_HAS_XF86VM*/ }  
glfw/src/x11_platform.h view
@@ -37,21 +37,25 @@ #include <X11/Xatom.h> #include <X11/Xcursor/Xcursor.h> -// The Xf86VidMode extension provides fallback gamma control-#include <X11/extensions/xf86vmode.h>- // The XRandR extension provides mode setting and gamma control #include <X11/extensions/Xrandr.h> -// The XInput2 extension provides improved input events-#include <X11/extensions/XInput2.h>- // The Xkb extension provides improved keyboard support #include <X11/XKBlib.h>  // The Xinerama extension provides legacy monitor indices #include <X11/extensions/Xinerama.h> +#if defined(_GLFW_HAS_XINPUT)+ // The XInput2 extension provides improved input events+ #include <X11/extensions/XInput2.h>+#endif++#if defined(_GLFW_HAS_XF86VM)+ // The Xf86VidMode extension provides fallback gamma control+ #include <X11/extensions/xf86vmode.h>+#endif+ #include "posix_tls.h"  #if defined(_GLFW_GLX)@@ -156,7 +160,7 @@     Atom            CLIPBOARD;     Atom            CLIPBOARD_MANAGER;     Atom            SAVE_TARGETS;-    Atom            _NULL;+    Atom            NULL_;     Atom            UTF8_STRING;     Atom            COMPOUND_STRING;     Atom            ATOM_PAIR;@@ -166,12 +170,6 @@         GLboolean   available;         int         eventBase;         int         errorBase;-    } vidmode;--    struct {-        GLboolean   available;-        int         eventBase;-        int         errorBase;         int         versionMajor;         int         versionMinor;         GLboolean   gammaBroken;@@ -189,15 +187,6 @@     } xkb;      struct {-        GLboolean   available;-        int         majorOpcode;-        int         eventBase;-        int         errorBase;-        int         versionMajor;-        int         versionMinor;-    } xi;--    struct {         int         count;         int         timeout;         int         interval;@@ -214,6 +203,25 @@         int         versionMajor;         int         versionMinor;     } xinerama;++#if defined(_GLFW_HAS_XINPUT)+    struct {+        GLboolean   available;+        int         majorOpcode;+        int         eventBase;+        int         errorBase;+        int         versionMajor;+        int         versionMinor;+    } xi;+#endif /*_GLFW_HAS_XINPUT*/++#if defined(_GLFW_HAS_XF86VM)+    struct {+        GLboolean   available;+        int         eventBase;+        int         errorBase;+    } vidmode;+#endif /*_GLFW_HAS_XF86VM*/  } _GLFWlibraryX11; 
glfw/src/x11_window.c view
@@ -28,6 +28,7 @@ #include "internal.h"  #include <X11/cursorfont.h>+#include <X11/Xmd.h>  #include <sys/select.h> @@ -183,11 +184,12 @@ }  // Splits and translates a text/uri-list into separate file paths+// NOTE: This function destroys the provided string // static char** parseUriList(char* text, int* count) {     const char* prefix = "file://";-    char** names = NULL;+    char** paths = NULL;     char* line;      *count = 0;@@ -196,7 +198,7 @@     {         text = NULL; -        if (*line == '#')+        if (line[0] == '#')             continue;          if (strncmp(line, prefix, strlen(prefix)) == 0)@@ -204,27 +206,27 @@          (*count)++; -        char* name = calloc(strlen(line) + 1, 1);-        names = realloc(names, *count * sizeof(char*));-        names[*count - 1] = name;+        char* path = calloc(strlen(line) + 1, 1);+        paths = realloc(paths, *count * sizeof(char*));+        paths[*count - 1] = path;          while (*line)         {             if (line[0] == '%' && line[1] && line[2])             {                 const char digits[3] = { line[1], line[2], '\0' };-                *name = strtol(digits, NULL, 16);+                *path = strtol(digits, NULL, 16);                 line += 2;             }             else-                *name = *line;+                *path = *line; -            name++;+            path++;             line++;         }     } -    return names;+    return paths; }  // Create the X11 window (and its colormap)@@ -411,6 +413,7 @@         XFree(hint);     } +#if defined(_GLFW_HAS_XINPUT)     if (_glfw.x11.xi.available)     {         // Select for XInput2 events@@ -425,6 +428,7 @@          XISelectEvents(_glfw.x11.display, window->x11.handle, &eventmask, 1);     }+#endif /*_GLFW_HAS_XINPUT*/      if (_glfw.x11.XdndAware)     {@@ -629,7 +633,7 @@         XChangeProperty(_glfw.x11.display,                         request->requestor,                         request->property,-                        _glfw.x11._NULL,+                        _glfw.x11.NULL_,                         32,                         PropModeReplace,                         NULL,@@ -1216,13 +1220,13 @@                 if (result)                 {                     int i, count;-                    char** names = parseUriList(data, &count);+                    char** paths = parseUriList(data, &count); -                    _glfwInputDrop(window, count, (const char**) names);+                    _glfwInputDrop(window, count, (const char**) paths);                      for (i = 0;  i < count;  i++)-                        free(names[i]);-                    free(names);+                        free(paths[i]);+                    free(paths);                 }                  XFree(data);@@ -1309,6 +1313,7 @@         case DestroyNotify:             return; +#if defined(_GLFW_HAS_XINPUT)         case GenericEvent:         {             if (event->xcookie.extension == _glfw.x11.xi.majorOpcode &&@@ -1354,6 +1359,7 @@             XFreeEventData(_glfw.x11.display, &event->xcookie);             break;         }+#endif /*_GLFW_HAS_XINPUT*/          default:         {@@ -1734,7 +1740,7 @@     event.type = ClientMessage;     event.xclient.window = window->x11.handle;     event.xclient.format = 32; // Data is 32-bit longs-    event.xclient.message_type = _glfw.x11._NULL;+    event.xclient.message_type = _glfw.x11.NULL_;      XSendEvent(_glfw.x11.display, window->x11.handle, False, 0, &event);     XFlush(_glfw.x11.display);