Hello community, here is the log from the commit of package ghc-bindings-GLFW for openSUSE:Factory checked in at 2016-11-10 13:19:51 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Comparing /work/SRC/openSUSE:Factory/ghc-bindings-GLFW (Old) and /work/SRC/openSUSE:Factory/.ghc-bindings-GLFW.new (New) ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Package is "ghc-bindings-GLFW" Changes: -------- --- /work/SRC/openSUSE:Factory/ghc-bindings-GLFW/ghc-bindings-GLFW.changes 2016-10-22 13:22:37.000000000 +0200 +++ /work/SRC/openSUSE:Factory/.ghc-bindings-GLFW.new/ghc-bindings-GLFW.changes 2016-11-10 13:19:52.000000000 +0100 @@ -1,0 +2,5 @@ +Tue Oct 11 08:49:47 UTC 2016 - [email protected] + +- Update to version 3.1.2.2 with cabal2obs. + +------------------------------------------------------------------- Old: ---- bindings-GLFW-3.1.2.1.tar.gz bindings-GLFW.cabal New: ---- bindings-GLFW-3.1.2.2.tar.gz ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ ghc-bindings-GLFW.spec ++++++ --- /var/tmp/diff_new_pack.pk2Xbc/_old 2016-11-10 13:19:53.000000000 +0100 +++ /var/tmp/diff_new_pack.pk2Xbc/_new 2016-11-10 13:19:53.000000000 +0100 @@ -19,14 +19,13 @@ %global pkg_name bindings-GLFW %bcond_with tests Name: ghc-%{pkg_name} -Version: 3.1.2.1 +Version: 3.1.2.2 Release: 0 Summary: Low-level bindings to GLFW OpenGL library License: BSD-2-Clause Group: Development/Languages/Other Url: https://hackage.haskell.org/package/%{pkg_name} Source0: https://hackage.haskell.org/package/%{pkg_name}-%{version}/%{pkg_name}-%{version}.tar.gz -Source1: https://hackage.haskell.org/package/%{pkg_name}-%{version}/revision/1.cabal#/%{pkg_name}.cabal BuildRequires: Mesa-libGL-devel BuildRequires: ghc-Cabal-devel BuildRequires: ghc-bindings-DSL-devel @@ -83,7 +82,6 @@ %prep %setup -q -n %{pkg_name}-%{version} -cp -p %{SOURCE1} %{pkg_name}.cabal %build %ghc_lib_build @@ -106,5 +104,6 @@ %files devel -f %{name}-devel.files %defattr(-,root,root,-) +%doc README.md %changelog ++++++ bindings-GLFW-3.1.2.1.tar.gz -> bindings-GLFW-3.1.2.2.tar.gz ++++++ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/README.md new/bindings-GLFW-3.1.2.2/README.md --- old/bindings-GLFW-3.1.2.1/README.md 2016-03-30 02:49:23.000000000 +0200 +++ new/bindings-GLFW-3.1.2.2/README.md 2016-10-01 19:41:05.000000000 +0200 @@ -1,5 +1,8 @@ bindings-GLFW ============= + +## Description + [](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/ diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/bindings-GLFW.cabal new/bindings-GLFW-3.1.2.2/bindings-GLFW.cabal --- old/bindings-GLFW-3.1.2.1/bindings-GLFW.cabal 2016-07-16 15:37:48.000000000 +0200 +++ new/bindings-GLFW-3.1.2.2/bindings-GLFW.cabal 2016-10-01 19:41:05.000000000 +0200 @@ -1,9 +1,11 @@ name: bindings-GLFW -version: 3.1.2.1 +version: 3.1.2.2 category: Graphics author: Brian Lewis <[email protected]> -maintainer: Schell Scivally <[email protected]>, Brian Lewis <[email protected]> +maintainer: Schell Scivally <[email protected]>, + Brian Lewis <[email protected]>, + Javier Jaramago <[email protected]> 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.* diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/include/GLFW/glfw3.h new/bindings-GLFW-3.1.2.2/glfw/include/GLFW/glfw3.h --- old/bindings-GLFW-3.1.2.1/glfw/include/GLFW/glfw3.h 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/include/GLFW/glfw3.h 2016-10-01 19:41:05.000000000 +0200 @@ -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,9 +3308,13 @@ * @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 * library is terminated. diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/include/os/darwin/glfw_config.h new/bindings-GLFW-3.1.2.2/glfw/include/os/darwin/glfw_config.h --- old/bindings-GLFW-3.1.2.1/glfw/include/os/darwin/glfw_config.h 2015-03-06 01:13:03.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/include/os/darwin/glfw_config.h 2016-10-01 19:41:05.000000000 +0200 @@ -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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/include/os/unix-like/glfw_config.h new/bindings-GLFW-3.1.2.2/glfw/include/os/unix-like/glfw_config.h --- old/bindings-GLFW-3.1.2.1/glfw/include/os/unix-like/glfw_config.h 2015-03-06 01:13:03.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/include/os/unix-like/glfw_config.h 2016-10-01 19:41:05.000000000 +0200 @@ -1,5 +1,5 @@ //======================================================================== -// GLFW 3.0 - www.glfw.org +// GLFW 3.1 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2010 Camilla Berglund <[email protected]> // @@ -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 @@ -79,6 +89,3 @@ // 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" - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/include/os/windows/glfw_config.h new/bindings-GLFW-3.1.2.2/glfw/include/os/windows/glfw_config.h --- old/bindings-GLFW-3.1.2.1/glfw/include/os/windows/glfw_config.h 2015-03-06 01:13:03.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/include/os/windows/glfw_config.h 2016-10-01 19:41:05.000000000 +0200 @@ -1,5 +1,5 @@ //======================================================================== -// GLFW 3.0 - www.glfw.org +// GLFW 3.1 - www.glfw.org //------------------------------------------------------------------------ // Copyright (c) 2010 Camilla Berglund <[email protected]> // @@ -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 @@ -79,6 +89,3 @@ // 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" - diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/cocoa_window.m new/bindings-GLFW-3.1.2.2/glfw/src/cocoa_window.m --- old/bindings-GLFW-3.1.2.1/glfw/src/cocoa_window.m 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/src/cocoa_window.m 2016-10-01 19:41:05.000000000 +0200 @@ -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) diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/input.c new/bindings-GLFW-3.1.2.2/glfw/src/input.c --- old/bindings-GLFW-3.1.2.1/glfw/src/input.c 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/src/input.c 2016-10-01 19:41:05.000000000 +0200 @@ -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); } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/internal.h new/bindings-GLFW-3.1.2.2/glfw/src/internal.h --- old/bindings-GLFW-3.1.2.1/glfw/src/internal.h 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/src/internal.h 2016-10-01 19:41:05.000000000 +0200 @@ -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 diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/linux_joystick.c new/bindings-GLFW-3.1.2.2/glfw/src/linux_joystick.c --- old/bindings-GLFW-3.1.2.1/glfw/src/linux_joystick.c 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/src/linux_joystick.c 2016-10-01 19:41:05.000000000 +0200 @@ -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__ } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/monitor.c new/bindings-GLFW-3.1.2.2/glfw/src/monitor.c --- old/bindings-GLFW-3.1.2.1/glfw/src/monitor.c 2015-04-22 19:25:32.000000000 +0200 +++ new/bindings-GLFW-3.1.2.2/glfw/src/monitor.c 2016-10-01 19:41:05.000000000 +0200 @@ -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 // diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/win32_window.c new/bindings-GLFW-3.1.2.2/glfw/src/win32_window.c --- old/bindings-GLFW-3.1.2.1/glfw/src/win32_window.c 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/src/win32_window.c 2016-10-01 19:41:05.000000000 +0200 @@ -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; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/x11_init.c new/bindings-GLFW-3.1.2.2/glfw/src/x11_init.c --- old/bindings-GLFW-3.1.2.1/glfw/src/x11_init.c 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/src/x11_init.c 2016-10-01 19:41:05.000000000 +0200 @@ -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 = diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/x11_monitor.c new/bindings-GLFW-3.1.2.2/glfw/src/x11_monitor.c --- old/bindings-GLFW-3.1.2.1/glfw/src/x11_monitor.c 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/src/x11_monitor.c 2016-10-01 19:41:05.000000000 +0200 @@ -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*/ } diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/x11_platform.h new/bindings-GLFW-3.1.2.2/glfw/src/x11_platform.h --- old/bindings-GLFW-3.1.2.1/glfw/src/x11_platform.h 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/src/x11_platform.h 2016-10-01 19:41:05.000000000 +0200 @@ -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; @@ -215,6 +204,25 @@ 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; diff -urN '--exclude=CVS' '--exclude=.cvsignore' '--exclude=.svn' '--exclude=.svnignore' old/bindings-GLFW-3.1.2.1/glfw/src/x11_window.c new/bindings-GLFW-3.1.2.2/glfw/src/x11_window.c --- old/bindings-GLFW-3.1.2.1/glfw/src/x11_window.c 2015-01-19 02:30:10.000000000 +0100 +++ new/bindings-GLFW-3.1.2.2/glfw/src/x11_window.c 2016-10-01 19:41:05.000000000 +0200 @@ -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);
