mirror of
https://github.com/glfw/glfw.git
synced 2026-09-21 16:44:11 +00:00
Compare commits
3 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 0a9038f47a | |||
| 3d62c9ed9d | |||
| 53fafad915 |
+4
-2
@@ -40,11 +40,11 @@ src/wayland-relative-pointer-unstable-v1-protocol.c
|
|||||||
# Compiled binaries
|
# Compiled binaries
|
||||||
src/libglfw.so
|
src/libglfw.so
|
||||||
src/libglfw.so.3
|
src/libglfw.so.3
|
||||||
src/libglfw.so.3.2
|
src/libglfw.so.3.3
|
||||||
src/libglfw.dylib
|
src/libglfw.dylib
|
||||||
src/libglfw.dylib
|
src/libglfw.dylib
|
||||||
src/libglfw.3.dylib
|
src/libglfw.3.dylib
|
||||||
src/libglfw.3.2.dylib
|
src/libglfw.3.3.dylib
|
||||||
src/libglfw3.a
|
src/libglfw3.a
|
||||||
src/glfw3.lib
|
src/glfw3.lib
|
||||||
src/glfw3.dll
|
src/glfw3.dll
|
||||||
@@ -67,6 +67,7 @@ tests/empty
|
|||||||
tests/events
|
tests/events
|
||||||
tests/gamma
|
tests/gamma
|
||||||
tests/glfwinfo
|
tests/glfwinfo
|
||||||
|
tests/icon
|
||||||
tests/iconify
|
tests/iconify
|
||||||
tests/joysticks
|
tests/joysticks
|
||||||
tests/monitors
|
tests/monitors
|
||||||
@@ -75,6 +76,7 @@ tests/reopen
|
|||||||
tests/sharing
|
tests/sharing
|
||||||
tests/tearing
|
tests/tearing
|
||||||
tests/threads
|
tests/threads
|
||||||
|
tests/timeout
|
||||||
tests/title
|
tests/title
|
||||||
tests/version
|
tests/version
|
||||||
tests/vulkan
|
tests/vulkan
|
||||||
|
|||||||
+2
-2
@@ -11,8 +11,8 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.0")
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(GLFW_VERSION_MAJOR "3")
|
set(GLFW_VERSION_MAJOR "3")
|
||||||
set(GLFW_VERSION_MINOR "2")
|
set(GLFW_VERSION_MINOR "3")
|
||||||
set(GLFW_VERSION_PATCH "1")
|
set(GLFW_VERSION_PATCH "0")
|
||||||
set(GLFW_VERSION_EXTRA "")
|
set(GLFW_VERSION_EXTRA "")
|
||||||
set(GLFW_VERSION "${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}")
|
set(GLFW_VERSION "${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}")
|
||||||
set(GLFW_VERSION_FULL "${GLFW_VERSION}.${GLFW_VERSION_PATCH}${GLFW_VERSION_EXTRA}")
|
set(GLFW_VERSION_FULL "${GLFW_VERSION}.${GLFW_VERSION_PATCH}${GLFW_VERSION_EXTRA}")
|
||||||
|
|||||||
@@ -13,15 +13,15 @@ creating windows, contexts and surfaces, reading input, handling events, etc.
|
|||||||
GLFW is licensed under the [zlib/libpng
|
GLFW is licensed under the [zlib/libpng
|
||||||
license](https://opensource.org/licenses/Zlib).
|
license](https://opensource.org/licenses/Zlib).
|
||||||
|
|
||||||
This is version 3.2.1, which adds support for statically linking the Vulkan
|
The latest stable release is version 3.2.1.
|
||||||
loader and fixes for a number of bugs that together affect all supported
|
|
||||||
platforms.
|
|
||||||
|
|
||||||
See the [downloads](http://www.glfw.org/download.html) page for details and
|
See the [downloads](http://www.glfw.org/download.html) page for details and
|
||||||
files, or fetch the `latest` branch, which always points to the latest stable
|
files, or fetch the `latest` branch, which always points to the latest stable
|
||||||
release. Each release starting with 3.0 also has a corresponding [annotated
|
release. Each release starting with 3.0 also has a corresponding [annotated
|
||||||
tag](https://github.com/glfw/glfw/releases) with source and binary archives.
|
tag](https://github.com/glfw/glfw/releases) with source and binary archives.
|
||||||
|
|
||||||
|
This is a development branch for version 3.3, which is _not yet described_.
|
||||||
|
|
||||||
If you are new to GLFW, you may find the
|
If you are new to GLFW, you may find the
|
||||||
[tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW
|
[tutorial](http://www.glfw.org/docs/latest/quick.html) for GLFW
|
||||||
3 useful. If you have used GLFW 2 in the past, there is a
|
3 useful. If you have used GLFW 2 in the past, there is a
|
||||||
@@ -99,34 +99,7 @@ information on what to include when reporting a bug.
|
|||||||
|
|
||||||
## Changelog
|
## Changelog
|
||||||
|
|
||||||
- Added on-demand loading of Vulkan and context creation API libraries
|
- [X11] Bugfix: The last interaction event time was not tracked
|
||||||
- Added `_GLFW_VULKAN_STATIC` build macro to make the library use the Vulkan
|
|
||||||
loader linked statically into the application (#820)
|
|
||||||
- Bugfix: Single compilation unit builds failed due to naming conflicts (#783)
|
|
||||||
- Bugfix: The range checks for `glfwSetCursorPos` used the wrong minimum (#773)
|
|
||||||
- Bugfix: Defining `GLFW_INCLUDE_VULKAN` when compiling the library did not
|
|
||||||
fail with the expected error message (#823)
|
|
||||||
- Bugfix: Inherited value of `CMAKE_MODULE_PATH` was clobbered (#822)
|
|
||||||
- [Win32] Bugfix: `glfwSetClipboardString` created an unnecessary intermediate
|
|
||||||
copy of the string
|
|
||||||
- [Win32] Bugfix: Examples failed to build on Visual C++ 2010 due to C99 in
|
|
||||||
`linmath.h` (#785)
|
|
||||||
- [Win32] Bugfix: The first shown window ignored the `GLFW_MAXIMIZED` hint
|
|
||||||
when the process was provided a `STARTUPINFO` (#780)
|
|
||||||
- [Cocoa] Bugfix: Event processing would segfault on some machines due to
|
|
||||||
a previous distributed notification listener not being fully
|
|
||||||
removed (#817,#826)
|
|
||||||
- [Cocoa] Bugfix: Some include statements were duplicated (#838)
|
|
||||||
- [X11] Bugfix: Window size limits were ignored if the minimum or maximum size
|
|
||||||
was set to `GLFW_DONT_CARE` (#805)
|
|
||||||
- [X11] Bugfix: Input focus was set before window was visible, causing
|
|
||||||
`BadMatch` on some non-reparenting WMs (#789,#798)
|
|
||||||
- [X11] Bugfix: `glfwGetWindowPos` and `glfwSetWindowPos` operated on the
|
|
||||||
window frame instead of the client area (#800)
|
|
||||||
- [WGL] Added reporting of errors from `WGL_ARB_create_context` extension
|
|
||||||
- [GLX] Bugfix: Dynamically loaded entry points were not verified
|
|
||||||
- [EGL] Added `lib` prefix matching between EGL and OpenGL ES library binaries
|
|
||||||
- [EGL] Bugfix: Dynamically loaded entry points were not verified
|
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|||||||
+1
-1
@@ -225,7 +225,7 @@ With just a few changes to your `CMakeLists.txt`, you can locate the package and
|
|||||||
target files generated when GLFW is installed.
|
target files generated when GLFW is installed.
|
||||||
|
|
||||||
@code{.cmake}
|
@code{.cmake}
|
||||||
find_package(glfw3 3.2 REQUIRED)
|
find_package(glfw3 3.3 REQUIRED)
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
Note that the dependencies do not include OpenGL or GLU, as GLFW loads any
|
Note that the dependencies do not include OpenGL or GLU, as GLFW loads any
|
||||||
|
|||||||
+1
-1
@@ -8,7 +8,7 @@ GLFW is a free, Open Source, multi-platform library for OpenGL, OpenGL ES and
|
|||||||
Vulkan application development. It provides a simple, platform-independent API
|
Vulkan application development. It provides a simple, platform-independent API
|
||||||
for creating windows, contexts and surfaces, reading input, handling events, etc.
|
for creating windows, contexts and surfaces, reading input, handling events, etc.
|
||||||
|
|
||||||
See @ref news_32 for release highlights or the
|
See @ref news_33 for release highlights or the
|
||||||
[version history](http://www.glfw.org/changelog.html) for details.
|
[version history](http://www.glfw.org/changelog.html) for details.
|
||||||
|
|
||||||
@ref quick_guide is a guide for users new to GLFW. It takes you through how to
|
@ref quick_guide is a guide for users new to GLFW. It takes you through how to
|
||||||
|
|||||||
@@ -2,6 +2,9 @@
|
|||||||
|
|
||||||
@page news New features
|
@page news New features
|
||||||
|
|
||||||
|
@section news_33 New features in 3.3
|
||||||
|
|
||||||
|
|
||||||
@section news_32 New features in 3.2
|
@section news_32 New features in 3.2
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -651,7 +651,7 @@ As long as your source file is encoded as UTF-8, you can use any Unicode
|
|||||||
characters directly in the source.
|
characters directly in the source.
|
||||||
|
|
||||||
@code
|
@code
|
||||||
glfwSetWindowTitle(window, "カウボーイビバップ");
|
glfwSetWindowTitle(window, "ラストエグザイル");
|
||||||
@endcode
|
@endcode
|
||||||
|
|
||||||
If you are using C++11 or C11, you can use a UTF-8 string literal.
|
If you are using C++11 or C11, you can use a UTF-8 string literal.
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* GLFW 3.2 - www.glfw.org
|
* GLFW 3.3 - www.glfw.org
|
||||||
* A library for OpenGL, window and input
|
* A library for OpenGL, window and input
|
||||||
*------------------------------------------------------------------------
|
*------------------------------------------------------------------------
|
||||||
* Copyright (c) 2002-2006 Marcus Geelnard
|
* Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
@@ -222,14 +222,14 @@ extern "C" {
|
|||||||
* backward-compatible.
|
* backward-compatible.
|
||||||
* @ingroup init
|
* @ingroup init
|
||||||
*/
|
*/
|
||||||
#define GLFW_VERSION_MINOR 2
|
#define GLFW_VERSION_MINOR 3
|
||||||
/*! @brief The revision number of the GLFW library.
|
/*! @brief The revision number of the GLFW library.
|
||||||
*
|
*
|
||||||
* This is incremented when a bug fix release is made that does not contain any
|
* This is incremented when a bug fix release is made that does not contain any
|
||||||
* API changes.
|
* API changes.
|
||||||
* @ingroup init
|
* @ingroup init
|
||||||
*/
|
*/
|
||||||
#define GLFW_VERSION_REVISION 1
|
#define GLFW_VERSION_REVISION 0
|
||||||
/*! @} */
|
/*! @} */
|
||||||
|
|
||||||
/*! @name Boolean values
|
/*! @name Boolean values
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
/*************************************************************************
|
/*************************************************************************
|
||||||
* GLFW 3.2 - www.glfw.org
|
* GLFW 3.3 - www.glfw.org
|
||||||
* A library for OpenGL, window and input
|
* A library for OpenGL, window and input
|
||||||
*------------------------------------------------------------------------
|
*------------------------------------------------------------------------
|
||||||
* Copyright (c) 2002-2006 Marcus Geelnard
|
* Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 OS X - www.glfw.org
|
// GLFW 3.3 OS X - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Cocoa - www.glfw.org
|
// GLFW 3.3 Cocoa - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Cocoa - www.glfw.org
|
// GLFW 3.3 Cocoa - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
// Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net>
|
// Copyright (c) 2012 Torsten Walluhn <tw@mad-cad.net>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 OS X - www.glfw.org
|
// GLFW 3.3 OS X - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 OS X - www.glfw.org
|
// GLFW 3.3 OS X - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 OS X - www.glfw.org
|
// GLFW 3.3 OS X - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 OS X - www.glfw.org
|
// GLFW 3.3 OS X - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 - www.glfw.org
|
// GLFW 3.3 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 EGL - www.glfw.org
|
// GLFW 3.3 EGL - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 EGL - www.glfw.org
|
// GLFW 3.3 EGL - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 - www.glfw.org
|
// GLFW 3.3 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2010-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2010-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 GLX - www.glfw.org
|
// GLFW 3.3 GLX - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 GLX - www.glfw.org
|
// GLFW 3.3 GLX - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 - www.glfw.org
|
// GLFW 3.3 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 - www.glfw.org
|
// GLFW 3.3 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 - www.glfw.org
|
// GLFW 3.3 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Linux - www.glfw.org
|
// GLFW 3.3 Linux - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Linux - www.glfw.org
|
// GLFW 3.3 Linux - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Mir - www.glfw.org
|
// GLFW 3.3 Mir - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014-2015 Brandon Schaefer <brandon.schaefer@canonical.com>
|
// Copyright (c) 2014-2015 Brandon Schaefer <brandon.schaefer@canonical.com>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Mir - www.glfw.org
|
// GLFW 3.3 Mir - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014-2015 Brandon Schaefer <brandon.schaefer@canonical.com>
|
// Copyright (c) 2014-2015 Brandon Schaefer <brandon.schaefer@canonical.com>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Mir - www.glfw.org
|
// GLFW 3.3 Mir - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014-2015 Brandon Schaefer <brandon.schaefer@canonical.com>
|
// Copyright (c) 2014-2015 Brandon Schaefer <brandon.schaefer@canonical.com>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Mir - www.glfw.org
|
// GLFW 3.3 Mir - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014-2015 Brandon Schaefer <brandon.schaefer@canonical.com>
|
// Copyright (c) 2014-2015 Brandon Schaefer <brandon.schaefer@canonical.com>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 - www.glfw.org
|
// GLFW 3.3 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 OS X - www.glfw.org
|
// GLFW 3.3 OS X - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 OS X - www.glfw.org
|
// GLFW 3.3 OS X - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2009-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 POSIX - www.glfw.org
|
// GLFW 3.3 POSIX - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 POSIX - www.glfw.org
|
// GLFW 3.3 POSIX - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 POSIX - www.glfw.org
|
// GLFW 3.3 POSIX - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 POSIX - www.glfw.org
|
// GLFW 3.3 POSIX - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 - www.glfw.org
|
// GLFW 3.3 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 WGL - www.glfw.org
|
// GLFW 3.3 WGL - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 WGL - www.glfw.org
|
// GLFW 3.3 WGL - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Win32 - www.glfw.org
|
// GLFW 3.3 Win32 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Win32 - www.glfw.org
|
// GLFW 3.3 Win32 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Win32 - www.glfw.org
|
// GLFW 3.3 Win32 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Win32 - www.glfw.org
|
// GLFW 3.3 Win32 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Win32 - www.glfw.org
|
// GLFW 3.3 Win32 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Win32 - www.glfw.org
|
// GLFW 3.3 Win32 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Win32 - www.glfw.org
|
// GLFW 3.3 Win32 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 - www.glfw.org
|
// GLFW 3.3 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Wayland - www.glfw.org
|
// GLFW 3.3 Wayland - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Wayland - www.glfw.org
|
// GLFW 3.3 Wayland - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Wayland - www.glfw.org
|
// GLFW 3.3 Wayland - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Wayland - www.glfw.org
|
// GLFW 3.3 Wayland - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||||
//
|
//
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 X11 - www.glfw.org
|
// GLFW 3.3 X11 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 X11 - www.glfw.org
|
// GLFW 3.3 X11 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+3
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 X11 - www.glfw.org
|
// GLFW 3.3 X11 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
@@ -156,6 +156,8 @@ typedef struct _GLFWlibraryX11
|
|||||||
double restoreCursorPosX, restoreCursorPosY;
|
double restoreCursorPosX, restoreCursorPosY;
|
||||||
// The window whose disabled cursor mode is active
|
// The window whose disabled cursor mode is active
|
||||||
_GLFWwindow* disabledCursorWindow;
|
_GLFWwindow* disabledCursorWindow;
|
||||||
|
// The last received event time
|
||||||
|
int lastEventTime;
|
||||||
|
|
||||||
// Window manager atoms
|
// Window manager atoms
|
||||||
Atom WM_PROTOCOLS;
|
Atom WM_PROTOCOLS;
|
||||||
|
|||||||
+31
-8
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 X11 - www.glfw.org
|
// GLFW 3.3 X11 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
@@ -819,7 +819,7 @@ static void pushSelectionToManager(_GLFWwindow* window)
|
|||||||
_glfw.x11.SAVE_TARGETS,
|
_glfw.x11.SAVE_TARGETS,
|
||||||
None,
|
None,
|
||||||
window->x11.handle,
|
window->x11.handle,
|
||||||
CurrentTime);
|
_glfw.x11.lastEventTime);
|
||||||
|
|
||||||
for (;;)
|
for (;;)
|
||||||
{
|
{
|
||||||
@@ -986,6 +986,8 @@ static void processEvent(XEvent *event)
|
|||||||
{
|
{
|
||||||
case KeyPress:
|
case KeyPress:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xkey.time;
|
||||||
|
|
||||||
const int key = translateKey(keycode);
|
const int key = translateKey(keycode);
|
||||||
const int mods = translateState(event->xkey.state);
|
const int mods = translateState(event->xkey.state);
|
||||||
const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT));
|
const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT));
|
||||||
@@ -1081,6 +1083,8 @@ static void processEvent(XEvent *event)
|
|||||||
|
|
||||||
case KeyRelease:
|
case KeyRelease:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xkey.time;
|
||||||
|
|
||||||
const int key = translateKey(keycode);
|
const int key = translateKey(keycode);
|
||||||
const int mods = translateState(event->xkey.state);
|
const int mods = translateState(event->xkey.state);
|
||||||
|
|
||||||
@@ -1122,6 +1126,8 @@ static void processEvent(XEvent *event)
|
|||||||
|
|
||||||
case ButtonPress:
|
case ButtonPress:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xbutton.time;
|
||||||
|
|
||||||
const int mods = translateState(event->xbutton.state);
|
const int mods = translateState(event->xbutton.state);
|
||||||
|
|
||||||
if (event->xbutton.button == Button1)
|
if (event->xbutton.button == Button1)
|
||||||
@@ -1156,6 +1162,8 @@ static void processEvent(XEvent *event)
|
|||||||
|
|
||||||
case ButtonRelease:
|
case ButtonRelease:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xbutton.time;
|
||||||
|
|
||||||
const int mods = translateState(event->xbutton.state);
|
const int mods = translateState(event->xbutton.state);
|
||||||
|
|
||||||
if (event->xbutton.button == Button1)
|
if (event->xbutton.button == Button1)
|
||||||
@@ -1194,6 +1202,8 @@ static void processEvent(XEvent *event)
|
|||||||
|
|
||||||
case EnterNotify:
|
case EnterNotify:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xcrossing.time;
|
||||||
|
|
||||||
// HACK: This is a workaround for WMs (KWM, Fluxbox) that otherwise
|
// HACK: This is a workaround for WMs (KWM, Fluxbox) that otherwise
|
||||||
// ignore the defined cursor for hidden cursor mode
|
// ignore the defined cursor for hidden cursor mode
|
||||||
if (window->cursorMode == GLFW_CURSOR_HIDDEN)
|
if (window->cursorMode == GLFW_CURSOR_HIDDEN)
|
||||||
@@ -1205,12 +1215,15 @@ static void processEvent(XEvent *event)
|
|||||||
|
|
||||||
case LeaveNotify:
|
case LeaveNotify:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xcrossing.time;
|
||||||
_glfwInputCursorEnter(window, GLFW_FALSE);
|
_glfwInputCursorEnter(window, GLFW_FALSE);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case MotionNotify:
|
case MotionNotify:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xmotion.time;
|
||||||
|
|
||||||
const int x = event->xmotion.x;
|
const int x = event->xmotion.x;
|
||||||
const int y = event->xmotion.y;
|
const int y = event->xmotion.y;
|
||||||
|
|
||||||
@@ -1323,7 +1336,8 @@ static void processEvent(XEvent *event)
|
|||||||
_glfw.x11.XdndSelection,
|
_glfw.x11.XdndSelection,
|
||||||
_glfw.x11.UTF8_STRING,
|
_glfw.x11.UTF8_STRING,
|
||||||
_glfw.x11.XdndSelection,
|
_glfw.x11.XdndSelection,
|
||||||
window->x11.handle, CurrentTime);
|
window->x11.handle,
|
||||||
|
_glfw.x11.lastEventTime);
|
||||||
}
|
}
|
||||||
else if (event->xclient.message_type == _glfw.x11.XdndPosition)
|
else if (event->xclient.message_type == _glfw.x11.XdndPosition)
|
||||||
{
|
{
|
||||||
@@ -1359,6 +1373,8 @@ static void processEvent(XEvent *event)
|
|||||||
|
|
||||||
case SelectionNotify:
|
case SelectionNotify:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xselection.time;
|
||||||
|
|
||||||
if (event->xselection.property)
|
if (event->xselection.property)
|
||||||
{
|
{
|
||||||
// The converted data from the drag operation has arrived
|
// The converted data from the drag operation has arrived
|
||||||
@@ -1454,6 +1470,8 @@ static void processEvent(XEvent *event)
|
|||||||
|
|
||||||
case PropertyNotify:
|
case PropertyNotify:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xproperty.time;
|
||||||
|
|
||||||
if (event->xproperty.atom == _glfw.x11.WM_STATE &&
|
if (event->xproperty.atom == _glfw.x11.WM_STATE &&
|
||||||
event->xproperty.state == PropertyNewValue)
|
event->xproperty.state == PropertyNewValue)
|
||||||
{
|
{
|
||||||
@@ -1479,12 +1497,14 @@ static void processEvent(XEvent *event)
|
|||||||
|
|
||||||
case SelectionClear:
|
case SelectionClear:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xselectionclear.time;
|
||||||
handleSelectionClear(event);
|
handleSelectionClear(event);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
case SelectionRequest:
|
case SelectionRequest:
|
||||||
{
|
{
|
||||||
|
_glfw.x11.lastEventTime = event->xselectionrequest.time;
|
||||||
handleSelectionRequest(event);
|
handleSelectionRequest(event);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
@@ -1952,7 +1972,7 @@ void _glfwPlatformFocusWindow(_GLFWwindow* window)
|
|||||||
{
|
{
|
||||||
XRaiseWindow(_glfw.x11.display, window->x11.handle);
|
XRaiseWindow(_glfw.x11.display, window->x11.handle);
|
||||||
XSetInputFocus(_glfw.x11.display, window->x11.handle,
|
XSetInputFocus(_glfw.x11.display, window->x11.handle,
|
||||||
RevertToParent, CurrentTime);
|
RevertToParent, _glfw.x11.lastEventTime);
|
||||||
}
|
}
|
||||||
|
|
||||||
XFlush(_glfw.x11.display);
|
XFlush(_glfw.x11.display);
|
||||||
@@ -2140,12 +2160,13 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
|
|||||||
XGrabPointer(_glfw.x11.display, window->x11.handle, True,
|
XGrabPointer(_glfw.x11.display, window->x11.handle, True,
|
||||||
ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
|
ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
|
||||||
GrabModeAsync, GrabModeAsync,
|
GrabModeAsync, GrabModeAsync,
|
||||||
window->x11.handle, _glfw.x11.cursor, CurrentTime);
|
window->x11.handle, _glfw.x11.cursor,
|
||||||
|
_glfw.x11.lastEventTime);
|
||||||
}
|
}
|
||||||
else if (_glfw.x11.disabledCursorWindow == window)
|
else if (_glfw.x11.disabledCursorWindow == window)
|
||||||
{
|
{
|
||||||
_glfw.x11.disabledCursorWindow = NULL;
|
_glfw.x11.disabledCursorWindow = NULL;
|
||||||
XUngrabPointer(_glfw.x11.display, CurrentTime);
|
XUngrabPointer(_glfw.x11.display, _glfw.x11.lastEventTime);
|
||||||
_glfwPlatformSetCursorPos(window,
|
_glfwPlatformSetCursorPos(window,
|
||||||
_glfw.x11.restoreCursorPosX,
|
_glfw.x11.restoreCursorPosX,
|
||||||
_glfw.x11.restoreCursorPosY);
|
_glfw.x11.restoreCursorPosY);
|
||||||
@@ -2230,7 +2251,8 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
|
|||||||
|
|
||||||
XSetSelectionOwner(_glfw.x11.display,
|
XSetSelectionOwner(_glfw.x11.display,
|
||||||
_glfw.x11.CLIPBOARD,
|
_glfw.x11.CLIPBOARD,
|
||||||
window->x11.handle, CurrentTime);
|
window->x11.handle,
|
||||||
|
_glfw.x11.lastEventTime);
|
||||||
|
|
||||||
if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.CLIPBOARD) !=
|
if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.CLIPBOARD) !=
|
||||||
window->x11.handle)
|
window->x11.handle)
|
||||||
@@ -2268,7 +2290,8 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
|
|||||||
_glfw.x11.CLIPBOARD,
|
_glfw.x11.CLIPBOARD,
|
||||||
formats[i],
|
formats[i],
|
||||||
_glfw.x11.GLFW_SELECTION,
|
_glfw.x11.GLFW_SELECTION,
|
||||||
window->x11.handle, CurrentTime);
|
window->x11.handle,
|
||||||
|
_glfw.x11.lastEventTime);
|
||||||
|
|
||||||
while (!XCheckTypedEvent(_glfw.x11.display, SelectionNotify, &event))
|
while (!XCheckTypedEvent(_glfw.x11.display, SelectionNotify, &event))
|
||||||
waitForEvent(NULL);
|
waitForEvent(NULL);
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 X11 - www.glfw.org
|
// GLFW 3.3 X11 - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2002-2006 Marcus Geelnard
|
// Copyright (c) 2002-2006 Marcus Geelnard
|
||||||
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
|
||||||
|
|||||||
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
//========================================================================
|
//========================================================================
|
||||||
// GLFW 3.2 Linux - www.glfw.org
|
// GLFW 3.3 Linux - www.glfw.org
|
||||||
//------------------------------------------------------------------------
|
//------------------------------------------------------------------------
|
||||||
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
// Copyright (c) 2014 Jonas Ådahl <jadahl@gmail.com>
|
||||||
//
|
//
|
||||||
|
|||||||
Reference in New Issue
Block a user