wayland: Implement 'DISABLED' cursor mode

This implements support for the 'DISABLED' cursor mode, which
effectively means locking the pointer to the surface. The cursor is also
explicitly hidden.

This adds two new build dependencies: wayland-scanner and
wayland-protocols.

Closes #708.
This commit is contained in:
Jonas Ådahl
2015-12-09 15:29:37 +08:00
committed by Camilla Berglund
parent c7f3bd0d22
commit cb08dc574c
7 changed files with 182 additions and 10 deletions
+9
View File
@@ -56,6 +56,9 @@ typedef VkBool32 (APIENTRY *PFN_vkGetPhysicalDeviceWaylandPresentationSupportKHR
#error "The Wayland backend depends on EGL platform support"
#endif
#include "wayland-relative-pointer-unstable-v1-client-protocol.h"
#include "wayland-pointer-constraints-unstable-v1-client-protocol.h"
#define _glfw_dlopen(name) dlopen(name, RTLD_LAZY | RTLD_LOCAL)
#define _glfw_dlclose(handle) dlclose(handle)
#define _glfw_dlsym(handle, name) dlsym(handle, name)
@@ -95,6 +98,10 @@ typedef struct _GLFWwindowWayland
int monitorsCount;
int monitorsSize;
struct {
struct zwp_relative_pointer_v1* relativePointer;
struct zwp_locked_pointer_v1* lockedPointer;
} pointerLock;
} _GLFWwindowWayland;
@@ -110,6 +117,8 @@ typedef struct _GLFWlibraryWayland
struct wl_seat* seat;
struct wl_pointer* pointer;
struct wl_keyboard* keyboard;
struct zwp_relative_pointer_manager_v1* relativePointerManager;
struct zwp_pointer_constraints_v1* pointerConstraints;
int wl_compositor_version;