Compare commits

...

3 Commits

Author SHA1 Message Date
Camilla Berglund 0a9038f47a X11: Add last event time tracking
Command time stamps help the server in the async wilderness.
2016-08-21 15:39:52 +02:00
Camilla Berglund 3d62c9ed9d Update .gitignore 2016-08-18 23:59:52 +02:00
Camilla Berglund 53fafad915 Start 3.3 2016-08-18 23:55:49 +02:00
59 changed files with 102 additions and 99 deletions
+4 -2
View File
@@ -40,11 +40,11 @@ src/wayland-relative-pointer-unstable-v1-protocol.c
# Compiled binaries
src/libglfw.so
src/libglfw.so.3
src/libglfw.so.3.2
src/libglfw.so.3.3
src/libglfw.dylib
src/libglfw.dylib
src/libglfw.3.dylib
src/libglfw.3.2.dylib
src/libglfw.3.3.dylib
src/libglfw3.a
src/glfw3.lib
src/glfw3.dll
@@ -67,6 +67,7 @@ tests/empty
tests/events
tests/gamma
tests/glfwinfo
tests/icon
tests/iconify
tests/joysticks
tests/monitors
@@ -75,6 +76,7 @@ tests/reopen
tests/sharing
tests/tearing
tests/threads
tests/timeout
tests/title
tests/version
tests/vulkan
+2 -2
View File
@@ -11,8 +11,8 @@ if (NOT CMAKE_VERSION VERSION_LESS "3.0")
endif()
set(GLFW_VERSION_MAJOR "3")
set(GLFW_VERSION_MINOR "2")
set(GLFW_VERSION_PATCH "1")
set(GLFW_VERSION_MINOR "3")
set(GLFW_VERSION_PATCH "0")
set(GLFW_VERSION_EXTRA "")
set(GLFW_VERSION "${GLFW_VERSION_MAJOR}.${GLFW_VERSION_MINOR}")
set(GLFW_VERSION_FULL "${GLFW_VERSION}.${GLFW_VERSION_PATCH}${GLFW_VERSION_EXTRA}")
+4 -31
View File
@@ -13,15 +13,15 @@ creating windows, contexts and surfaces, reading input, handling events, etc.
GLFW is licensed under the [zlib/libpng
license](https://opensource.org/licenses/Zlib).
This is version 3.2.1, which adds support for statically linking the Vulkan
loader and fixes for a number of bugs that together affect all supported
platforms.
The latest stable release is version 3.2.1.
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
release. Each release starting with 3.0 also has a corresponding [annotated
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
[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
@@ -99,34 +99,7 @@ information on what to include when reporting a bug.
## Changelog
- Added on-demand loading of Vulkan and context creation API libraries
- 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
- [X11] Bugfix: The last interaction event time was not tracked
## Contact
+1 -1
View File
@@ -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.
@code{.cmake}
find_package(glfw3 3.2 REQUIRED)
find_package(glfw3 3.3 REQUIRED)
@endcode
Note that the dependencies do not include OpenGL or GLU, as GLFW loads any
+1 -1
View File
@@ -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
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.
@ref quick_guide is a guide for users new to GLFW. It takes you through how to
+3
View File
@@ -2,6 +2,9 @@
@page news New features
@section news_33 New features in 3.3
@section news_32 New features in 3.2
+1 -1
View File
@@ -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.
@code
glfwSetWindowTitle(window, "カウボーイビバップ");
glfwSetWindowTitle(window, "ラストエグザイル");
@endcode
If you are using C++11 or C11, you can use a UTF-8 string literal.
+3 -3
View File
@@ -1,5 +1,5 @@
/*************************************************************************
* GLFW 3.2 - www.glfw.org
* GLFW 3.3 - www.glfw.org
* A library for OpenGL, window and input
*------------------------------------------------------------------------
* Copyright (c) 2002-2006 Marcus Geelnard
@@ -222,14 +222,14 @@ extern "C" {
* backward-compatible.
* @ingroup init
*/
#define GLFW_VERSION_MINOR 2
#define GLFW_VERSION_MINOR 3
/*! @brief The revision number of the GLFW library.
*
* This is incremented when a bug fix release is made that does not contain any
* API changes.
* @ingroup init
*/
#define GLFW_VERSION_REVISION 1
#define GLFW_VERSION_REVISION 0
/*! @} */
/*! @name Boolean values
+1 -1
View File
@@ -1,5 +1,5 @@
/*************************************************************************
* GLFW 3.2 - www.glfw.org
* GLFW 3.3 - www.glfw.org
* A library for OpenGL, window and input
*------------------------------------------------------------------------
* Copyright (c) 2002-2006 Marcus Geelnard
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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) 2012 Torsten Walluhn <tw@mad-cad.net>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -1,5 +1,5 @@
//========================================================================
// GLFW 3.2 - www.glfw.org
// GLFW 3.3 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2002-2006 Marcus Geelnard
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -1,5 +1,5 @@
//========================================================================
// GLFW 3.2 - www.glfw.org
// GLFW 3.3 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2002-2006 Marcus Geelnard
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -1,5 +1,5 @@
//========================================================================
// GLFW 3.2 - www.glfw.org
// GLFW 3.3 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2002-2006 Marcus Geelnard
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -1,5 +1,5 @@
//========================================================================
// GLFW 3.2 - www.glfw.org
// GLFW 3.3 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2002-2006 Marcus Geelnard
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -1,5 +1,5 @@
//========================================================================
// GLFW 3.2 - www.glfw.org
// GLFW 3.3 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2002-2006 Marcus Geelnard
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -1,5 +1,5 @@
//========================================================================
// GLFW 3.2 - www.glfw.org
// GLFW 3.3 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2002-2006 Marcus Geelnard
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -1,5 +1,5 @@
//========================================================================
// GLFW 3.2 - www.glfw.org
// GLFW 3.3 - www.glfw.org
//------------------------------------------------------------------------
// Copyright (c) 2002-2006 Marcus Geelnard
// Copyright (c) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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>
//
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+3 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
@@ -156,6 +156,8 @@ typedef struct _GLFWlibraryX11
double restoreCursorPosX, restoreCursorPosY;
// The window whose disabled cursor mode is active
_GLFWwindow* disabledCursorWindow;
// The last received event time
int lastEventTime;
// Window manager atoms
Atom WM_PROTOCOLS;
+31 -8
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
@@ -819,7 +819,7 @@ static void pushSelectionToManager(_GLFWwindow* window)
_glfw.x11.SAVE_TARGETS,
None,
window->x11.handle,
CurrentTime);
_glfw.x11.lastEventTime);
for (;;)
{
@@ -986,6 +986,8 @@ static void processEvent(XEvent *event)
{
case KeyPress:
{
_glfw.x11.lastEventTime = event->xkey.time;
const int key = translateKey(keycode);
const int mods = translateState(event->xkey.state);
const int plain = !(mods & (GLFW_MOD_CONTROL | GLFW_MOD_ALT));
@@ -1081,6 +1083,8 @@ static void processEvent(XEvent *event)
case KeyRelease:
{
_glfw.x11.lastEventTime = event->xkey.time;
const int key = translateKey(keycode);
const int mods = translateState(event->xkey.state);
@@ -1122,6 +1126,8 @@ static void processEvent(XEvent *event)
case ButtonPress:
{
_glfw.x11.lastEventTime = event->xbutton.time;
const int mods = translateState(event->xbutton.state);
if (event->xbutton.button == Button1)
@@ -1156,6 +1162,8 @@ static void processEvent(XEvent *event)
case ButtonRelease:
{
_glfw.x11.lastEventTime = event->xbutton.time;
const int mods = translateState(event->xbutton.state);
if (event->xbutton.button == Button1)
@@ -1194,6 +1202,8 @@ static void processEvent(XEvent *event)
case EnterNotify:
{
_glfw.x11.lastEventTime = event->xcrossing.time;
// HACK: This is a workaround for WMs (KWM, Fluxbox) that otherwise
// ignore the defined cursor for hidden cursor mode
if (window->cursorMode == GLFW_CURSOR_HIDDEN)
@@ -1205,12 +1215,15 @@ static void processEvent(XEvent *event)
case LeaveNotify:
{
_glfw.x11.lastEventTime = event->xcrossing.time;
_glfwInputCursorEnter(window, GLFW_FALSE);
return;
}
case MotionNotify:
{
_glfw.x11.lastEventTime = event->xmotion.time;
const int x = event->xmotion.x;
const int y = event->xmotion.y;
@@ -1323,7 +1336,8 @@ static void processEvent(XEvent *event)
_glfw.x11.XdndSelection,
_glfw.x11.UTF8_STRING,
_glfw.x11.XdndSelection,
window->x11.handle, CurrentTime);
window->x11.handle,
_glfw.x11.lastEventTime);
}
else if (event->xclient.message_type == _glfw.x11.XdndPosition)
{
@@ -1359,6 +1373,8 @@ static void processEvent(XEvent *event)
case SelectionNotify:
{
_glfw.x11.lastEventTime = event->xselection.time;
if (event->xselection.property)
{
// The converted data from the drag operation has arrived
@@ -1454,6 +1470,8 @@ static void processEvent(XEvent *event)
case PropertyNotify:
{
_glfw.x11.lastEventTime = event->xproperty.time;
if (event->xproperty.atom == _glfw.x11.WM_STATE &&
event->xproperty.state == PropertyNewValue)
{
@@ -1479,12 +1497,14 @@ static void processEvent(XEvent *event)
case SelectionClear:
{
_glfw.x11.lastEventTime = event->xselectionclear.time;
handleSelectionClear(event);
return;
}
case SelectionRequest:
{
_glfw.x11.lastEventTime = event->xselectionrequest.time;
handleSelectionRequest(event);
return;
}
@@ -1952,7 +1972,7 @@ void _glfwPlatformFocusWindow(_GLFWwindow* window)
{
XRaiseWindow(_glfw.x11.display, window->x11.handle);
XSetInputFocus(_glfw.x11.display, window->x11.handle,
RevertToParent, CurrentTime);
RevertToParent, _glfw.x11.lastEventTime);
}
XFlush(_glfw.x11.display);
@@ -2140,12 +2160,13 @@ void _glfwPlatformSetCursorMode(_GLFWwindow* window, int mode)
XGrabPointer(_glfw.x11.display, window->x11.handle, True,
ButtonPressMask | ButtonReleaseMask | PointerMotionMask,
GrabModeAsync, GrabModeAsync,
window->x11.handle, _glfw.x11.cursor, CurrentTime);
window->x11.handle, _glfw.x11.cursor,
_glfw.x11.lastEventTime);
}
else if (_glfw.x11.disabledCursorWindow == window)
{
_glfw.x11.disabledCursorWindow = NULL;
XUngrabPointer(_glfw.x11.display, CurrentTime);
XUngrabPointer(_glfw.x11.display, _glfw.x11.lastEventTime);
_glfwPlatformSetCursorPos(window,
_glfw.x11.restoreCursorPosX,
_glfw.x11.restoreCursorPosY);
@@ -2230,7 +2251,8 @@ void _glfwPlatformSetClipboardString(_GLFWwindow* window, const char* string)
XSetSelectionOwner(_glfw.x11.display,
_glfw.x11.CLIPBOARD,
window->x11.handle, CurrentTime);
window->x11.handle,
_glfw.x11.lastEventTime);
if (XGetSelectionOwner(_glfw.x11.display, _glfw.x11.CLIPBOARD) !=
window->x11.handle)
@@ -2268,7 +2290,8 @@ const char* _glfwPlatformGetClipboardString(_GLFWwindow* window)
_glfw.x11.CLIPBOARD,
formats[i],
_glfw.x11.GLFW_SELECTION,
window->x11.handle, CurrentTime);
window->x11.handle,
_glfw.x11.lastEventTime);
while (!XCheckTypedEvent(_glfw.x11.display, SelectionNotify, &event))
waitForEvent(NULL);
+1 -1
View File
@@ -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) 2006-2016 Camilla Berglund <elmindreda@glfw.org>
+1 -1
View File
@@ -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>
//