mirror of
https://github.com/glfw/glfw.git
synced 2025-12-16 12:13:17 +00:00
Wayland: Fix missing checks for optional protocol
This commit is contained in:
parent
ebff6606ee
commit
1ce855b0b1
@ -146,6 +146,8 @@ information on what to include when reporting a bug.
|
|||||||
from a modal to the content area
|
from a modal to the content area
|
||||||
- [Wayland] Bugfix: free modules at end of terminate function to resolve
|
- [Wayland] Bugfix: free modules at end of terminate function to resolve
|
||||||
potential segmentation fault (#2744)
|
potential segmentation fault (#2744)
|
||||||
|
- [Wayland] Bugfix: Confining or disabling the cursor could segfault on
|
||||||
|
compositors without `pointer-constraints-unstable-v1`
|
||||||
- [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)
|
||||||
- [X11] Bugfix: Occasional crash when an idle display awakes (#2766)
|
- [X11] Bugfix: Occasional crash when an idle display awakes (#2766)
|
||||||
- [X11] Bugfix: Prevent BadWindow when creating small windows with a content scale
|
- [X11] Bugfix: Prevent BadWindow when creating small windows with a content scale
|
||||||
|
|||||||
@ -2974,10 +2974,16 @@ static void lockPointer(_GLFWwindow* window)
|
|||||||
if (!_glfw.wl.relativePointerManager)
|
if (!_glfw.wl.relativePointerManager)
|
||||||
{
|
{
|
||||||
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
||||||
"Wayland: The compositor does not support pointer locking");
|
"Wayland: The compositor does not support relative pointer motion");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!_glfw.wl.pointerConstraints)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
||||||
|
"Wayland: The compositor does not support locking the pointer");
|
||||||
|
}
|
||||||
|
|
||||||
window->wl.relativePointer =
|
window->wl.relativePointer =
|
||||||
zwp_relative_pointer_manager_v1_get_relative_pointer(
|
zwp_relative_pointer_manager_v1_get_relative_pointer(
|
||||||
_glfw.wl.relativePointerManager,
|
_glfw.wl.relativePointerManager,
|
||||||
@ -3025,6 +3031,12 @@ static const struct zwp_confined_pointer_v1_listener confinedPointerListener =
|
|||||||
|
|
||||||
static void confinePointer(_GLFWwindow* window)
|
static void confinePointer(_GLFWwindow* window)
|
||||||
{
|
{
|
||||||
|
if (!_glfw.wl.pointerConstraints)
|
||||||
|
{
|
||||||
|
_glfwInputError(GLFW_FEATURE_UNAVAILABLE,
|
||||||
|
"Wayland: The compositor does not support confining the pointer");
|
||||||
|
}
|
||||||
|
|
||||||
window->wl.confinedPointer =
|
window->wl.confinedPointer =
|
||||||
zwp_pointer_constraints_v1_confine_pointer(
|
zwp_pointer_constraints_v1_confine_pointer(
|
||||||
_glfw.wl.pointerConstraints,
|
_glfw.wl.pointerConstraints,
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user