mirror of
https://github.com/glfw/glfw.git
synced 2025-12-21 14:42:06 +00:00
Compare commits
7 Commits
725ed45b35
...
6de2b72969
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
6de2b72969 | ||
|
|
7ef6efeb66 | ||
|
|
3cf9f6726d | ||
|
|
bfa1c424e5 | ||
|
|
5115508d2c | ||
|
|
dca02a988b | ||
|
|
be0d9e8a56 |
@ -99,6 +99,7 @@ video tutorials.
|
|||||||
- Björn Hempel
|
- Björn Hempel
|
||||||
- Matthew Henry
|
- Matthew Henry
|
||||||
- heromyth
|
- heromyth
|
||||||
|
- Jochen Heizmann
|
||||||
- Lucas Hinderberger
|
- Lucas Hinderberger
|
||||||
- Paul Holden
|
- Paul Holden
|
||||||
- Hajime Hoshi
|
- Hajime Hoshi
|
||||||
|
|||||||
@ -139,11 +139,17 @@ information on what to include when reporting a bug.
|
|||||||
fallback decorations
|
fallback decorations
|
||||||
- [Wayland] Bugfix: Fallback decorations would report scroll events
|
- [Wayland] Bugfix: Fallback decorations would report scroll events
|
||||||
- [Wayland] Bugfix: Keyboard repeat events halted when any key is released (#2568)
|
- [Wayland] Bugfix: Keyboard repeat events halted when any key is released (#2568)
|
||||||
|
- [Wayland] Bugfix: Fallback decorations would show menu at wrong position
|
||||||
|
- [Wayland] Bugfix: The cursor was not updated when clicking through from
|
||||||
|
a modal to a fallback decoration
|
||||||
|
- [Wayland] Bugfix: The cursor position was not updated when clicking through
|
||||||
|
from a modal to the content area
|
||||||
- [X11] Bugfix: Running without a WM could trigger an assert (#2593,#2601,#2631)
|
- [X11] Bugfix: Running without a WM could trigger an assert (#2593,#2601,#2631)
|
||||||
- [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface`
|
- [Null] Added Vulkan 'window' surface creation via `VK_EXT_headless_surface`
|
||||||
- [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
|
- [Null] Added EGL context creation on Mesa via `EGL_MESA_platform_surfaceless`
|
||||||
- [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to
|
- [EGL] Allowed native access on Wayland with `GLFW_CONTEXT_CREATION_API` set to
|
||||||
`GLFW_NATIVE_CONTEXT_API` (#2518)
|
`GLFW_NATIVE_CONTEXT_API` (#2518)
|
||||||
|
- [Linux] Bugfix: Non-joystick input devices were incorrectly detected as joysticks on Raspberry PI OS
|
||||||
|
|
||||||
|
|
||||||
## Contact
|
## Contact
|
||||||
|
|||||||
@ -157,10 +157,19 @@ static GLFWbool openJoystickDevice(const char* path)
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Ensure this device supports the events expected of a joystick
|
// Ensure this device supports the events expected of a joystick
|
||||||
if (!isBitSet(EV_ABS, evBits))
|
// NOTE: SDL2 based Joystick Check
|
||||||
|
if (isBitSet(BTN_STYLUS, keyBits) ||
|
||||||
|
isBitSet(BTN_TOOL_PEN, keyBits) ||
|
||||||
|
isBitSet(BTN_TOOL_FINGER, keyBits) ||
|
||||||
|
isBitSet(BTN_MOUSE, keyBits) ||
|
||||||
|
isBitSet(BTN_TOUCH, keyBits) ||
|
||||||
|
(keyBits[0] & 0xFFFFFFFE) != 0)
|
||||||
{
|
{
|
||||||
close(linjs.fd);
|
close(linjs.fd);
|
||||||
return GLFW_FALSE;
|
return GLFW_FALSE;
|
||||||
|
} else if (!isBitSet(EV_ABS, evBits)) {
|
||||||
|
close(linjs.fd);
|
||||||
|
return GLFW_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
char name[256] = "";
|
char name[256] = "";
|
||||||
@ -168,6 +177,17 @@ static GLFWbool openJoystickDevice(const char* path)
|
|||||||
if (ioctl(linjs.fd, EVIOCGNAME(sizeof(name)), name) < 0)
|
if (ioctl(linjs.fd, EVIOCGNAME(sizeof(name)), name) < 0)
|
||||||
strncpy(name, "Unknown", sizeof(name));
|
strncpy(name, "Unknown", sizeof(name));
|
||||||
|
|
||||||
|
// NOTE: Some devices are still indentified as Gamepad devices (Rapsbery PI 500, Hypertouch Square Display).
|
||||||
|
// They are filtered out for enumeration. I wish there is a more robust way to detect if a device is really
|
||||||
|
// a gamecontroller/gamepad, but I wasn't able to find a way.
|
||||||
|
if (strstr(name, "Keyboard System Control") ||
|
||||||
|
strstr(name, "Keyboard Consumer Control") ||
|
||||||
|
strstr(name, "11-0048 EP0110M09") ||
|
||||||
|
strstr(name, "HID 046a:0023")) {
|
||||||
|
close(linjs.fd);
|
||||||
|
return GLFW_FALSE;
|
||||||
|
}
|
||||||
|
|
||||||
char guid[33] = "";
|
char guid[33] = "";
|
||||||
|
|
||||||
// Generate a joystick GUID that matches the SDL 2.0.5+ one
|
// Generate a joystick GUID that matches the SDL 2.0.5+ one
|
||||||
@ -433,4 +453,3 @@ void _glfwUpdateGamepadGUIDLinux(char* guid)
|
|||||||
}
|
}
|
||||||
|
|
||||||
#endif // GLFW_BUILD_LINUX_JOYSTICK
|
#endif // GLFW_BUILD_LINUX_JOYSTICK
|
||||||
|
|
||||||
|
|||||||
@ -405,13 +405,19 @@ static void handleFallbackDecorationButton(_GLFWwindow* window,
|
|||||||
}
|
}
|
||||||
else if (button == BTN_RIGHT)
|
else if (button == BTN_RIGHT)
|
||||||
{
|
{
|
||||||
if (window->wl.xdg.toplevel)
|
if (!window->wl.xdg.toplevel)
|
||||||
{
|
return;
|
||||||
xdg_toplevel_show_window_menu(window->wl.xdg.toplevel,
|
|
||||||
_glfw.wl.seat, serial,
|
if (window->wl.fallback.focus != window->wl.fallback.top.surface)
|
||||||
window->wl.cursorPosX,
|
return;
|
||||||
window->wl.cursorPosY);
|
|
||||||
}
|
if (ypos < GLFW_BORDER_SIZE)
|
||||||
|
return;
|
||||||
|
|
||||||
|
xdg_toplevel_show_window_menu(window->wl.xdg.toplevel,
|
||||||
|
_glfw.wl.seat, serial,
|
||||||
|
xpos,
|
||||||
|
ypos - GLFW_CAPTION_HEIGHT - GLFW_BORDER_SIZE);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1532,11 +1538,21 @@ static void pointerHandleEnter(void* userData,
|
|||||||
window->wl.hovered = GLFW_TRUE;
|
window->wl.hovered = GLFW_TRUE;
|
||||||
_glfwSetCursorWayland(window, window->wl.currentCursor);
|
_glfwSetCursorWayland(window, window->wl.currentCursor);
|
||||||
_glfwInputCursorEnter(window, GLFW_TRUE);
|
_glfwInputCursorEnter(window, GLFW_TRUE);
|
||||||
|
|
||||||
|
if (window->cursorMode != GLFW_CURSOR_DISABLED)
|
||||||
|
{
|
||||||
|
window->wl.cursorPosX = wl_fixed_to_double(sx);
|
||||||
|
window->wl.cursorPosY = wl_fixed_to_double(sy);
|
||||||
|
_glfwInputCursorPos(window, window->wl.cursorPosX, window->wl.cursorPosY);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (window->wl.fallback.decorations)
|
if (window->wl.fallback.decorations)
|
||||||
|
{
|
||||||
window->wl.fallback.focus = surface;
|
window->wl.fallback.focus = surface;
|
||||||
|
updateFallbackDecorationCursor(window, sx, sy);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user