Update glfw from upstream
This commit is contained in:
6
glfw/glfw3.h
vendored
6
glfw/glfw3.h
vendored
@@ -4009,8 +4009,8 @@ GLFWAPI int glfwGetKey(GLFWwindow* window, int key);
|
|||||||
* `GLFW_RELEASE`.
|
* `GLFW_RELEASE`.
|
||||||
*
|
*
|
||||||
* If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function
|
* If the @ref GLFW_STICKY_MOUSE_BUTTONS input mode is enabled, this function
|
||||||
* `GLFW_PRESS` the first time you call it for a mouse button that was pressed,
|
* returns `GLFW_PRESS` the first time you call it for a mouse button that was
|
||||||
* even if that mouse button has already been released.
|
* pressed, even if that mouse button has already been released.
|
||||||
*
|
*
|
||||||
* @param[in] window The desired window.
|
* @param[in] window The desired window.
|
||||||
* @param[in] button The desired [mouse button](@ref buttons).
|
* @param[in] button The desired [mouse button](@ref buttons).
|
||||||
@@ -4807,6 +4807,8 @@ GLFWAPI const char* glfwGetGamepadName(int jid);
|
|||||||
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
* @errors Possible errors include @ref GLFW_NOT_INITIALIZED and @ref
|
||||||
* GLFW_INVALID_ENUM.
|
* GLFW_INVALID_ENUM.
|
||||||
*
|
*
|
||||||
|
* @thread_safety This function must only be called from the main thread.
|
||||||
|
*
|
||||||
* @sa @ref gamepad
|
* @sa @ref gamepad
|
||||||
* @sa @ref glfwUpdateGamepadMappings
|
* @sa @ref glfwUpdateGamepadMappings
|
||||||
* @sa @ref glfwJoystickIsGamepad
|
* @sa @ref glfwJoystickIsGamepad
|
||||||
|
|||||||
4
glfw/win32_platform.h
vendored
4
glfw/win32_platform.h
vendored
@@ -142,6 +142,9 @@ typedef enum
|
|||||||
|
|
||||||
// HACK: Define versionhelpers.h functions manually as MinGW lacks the header
|
// HACK: Define versionhelpers.h functions manually as MinGW lacks the header
|
||||||
BOOL IsWindowsVersionOrGreater(WORD major, WORD minor, WORD sp);
|
BOOL IsWindowsVersionOrGreater(WORD major, WORD minor, WORD sp);
|
||||||
|
#define IsWindowsXPOrGreater() \
|
||||||
|
IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_WINXP), \
|
||||||
|
LOBYTE(_WIN32_WINNT_WINXP), 0)
|
||||||
#define IsWindowsVistaOrGreater() \
|
#define IsWindowsVistaOrGreater() \
|
||||||
IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), \
|
IsWindowsVersionOrGreater(HIBYTE(_WIN32_WINNT_VISTA), \
|
||||||
LOBYTE(_WIN32_WINNT_VISTA), 0)
|
LOBYTE(_WIN32_WINNT_VISTA), 0)
|
||||||
@@ -300,6 +303,7 @@ typedef struct _GLFWlibraryWin32
|
|||||||
_GLFWwindow* disabledCursorWindow;
|
_GLFWwindow* disabledCursorWindow;
|
||||||
RAWINPUT* rawInput;
|
RAWINPUT* rawInput;
|
||||||
int rawInputSize;
|
int rawInputSize;
|
||||||
|
UINT mouseTrailSize;
|
||||||
|
|
||||||
struct {
|
struct {
|
||||||
HINSTANCE instance;
|
HINSTANCE instance;
|
||||||
|
|||||||
17
glfw/win32_window.c
vendored
17
glfw/win32_window.c
vendored
@@ -529,7 +529,18 @@ static void fitToMonitor(_GLFWwindow* window)
|
|||||||
static void acquireMonitor(_GLFWwindow* window)
|
static void acquireMonitor(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
if (!_glfw.win32.acquiredMonitorCount)
|
if (!_glfw.win32.acquiredMonitorCount)
|
||||||
|
{
|
||||||
SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);
|
SetThreadExecutionState(ES_CONTINUOUS | ES_DISPLAY_REQUIRED);
|
||||||
|
|
||||||
|
// HACK: When mouse trails are enabled the cursor becomes invisible when
|
||||||
|
// the OpenGL ICD switches to page flipping
|
||||||
|
if (IsWindowsXPOrGreater())
|
||||||
|
{
|
||||||
|
SystemParametersInfo(SPI_GETMOUSETRAILS, 0, &_glfw.win32.mouseTrailSize, 0);
|
||||||
|
SystemParametersInfo(SPI_SETMOUSETRAILS, 0, 0, 0);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if (!window->monitor->window)
|
if (!window->monitor->window)
|
||||||
_glfw.win32.acquiredMonitorCount++;
|
_glfw.win32.acquiredMonitorCount++;
|
||||||
|
|
||||||
@@ -546,8 +557,14 @@ static void releaseMonitor(_GLFWwindow* window)
|
|||||||
|
|
||||||
_glfw.win32.acquiredMonitorCount--;
|
_glfw.win32.acquiredMonitorCount--;
|
||||||
if (!_glfw.win32.acquiredMonitorCount)
|
if (!_glfw.win32.acquiredMonitorCount)
|
||||||
|
{
|
||||||
SetThreadExecutionState(ES_CONTINUOUS);
|
SetThreadExecutionState(ES_CONTINUOUS);
|
||||||
|
|
||||||
|
// HACK: Restore mouse trail length saved in acquireMonitor
|
||||||
|
if (IsWindowsXPOrGreater())
|
||||||
|
SystemParametersInfo(SPI_SETMOUSETRAILS, _glfw.win32.mouseTrailSize, 0, 0);
|
||||||
|
}
|
||||||
|
|
||||||
_glfwInputMonitorWindow(window->monitor, NULL);
|
_glfwInputMonitorWindow(window->monitor, NULL);
|
||||||
_glfwRestoreVideoModeWin32(window->monitor);
|
_glfwRestoreVideoModeWin32(window->monitor);
|
||||||
}
|
}
|
||||||
|
|||||||
4
kitty/glfw-wrapper.h
generated
4
kitty/glfw-wrapper.h
generated
@@ -1160,7 +1160,9 @@ typedef void (* GLFWscrollfun)(GLFWwindow*,double,double);
|
|||||||
* @param[in] mods Bit field describing which [modifier keys](@ref mods) were
|
* @param[in] mods Bit field describing which [modifier keys](@ref mods) were
|
||||||
* held down.
|
* held down.
|
||||||
* @param[in] text UTF-8 encoded text generated by this key event or empty string.
|
* @param[in] text UTF-8 encoded text generated by this key event or empty string.
|
||||||
* @param[in] reserved Reserved for future use.
|
* @param[in] Used for Input Method events. Zero for normal key events.
|
||||||
|
* A value of 1 means the pre-edit text for the input event has been changed.
|
||||||
|
* A value of 2 means the text should be committed.
|
||||||
*
|
*
|
||||||
* @note On X11/Wayland if a modifier other than the modifiers GLFW reports
|
* @note On X11/Wayland if a modifier other than the modifiers GLFW reports
|
||||||
* (ctrl/shift/alt/super) is used, GLFW will report the shifted key rather
|
* (ctrl/shift/alt/super) is used, GLFW will report the shifted key rather
|
||||||
|
|||||||
Reference in New Issue
Block a user