mirror of
https://github.com/glfw/glfw.git
synced 2026-02-17 21:12:34 +01:00
Wayland: Remove dependency on wayland-protocols
This brings the latest released versions of all used Wayland protocol files into this repository, removing the need for the user to arrange a sufficiently new version of wayland-protocols. The wayland.xml protocol file was copied from wayland 1.22.0. The additional protocol files were copied from wayland-protocols 1.32. Because of how files are moved and renamed inside the wayland-protocols repository, it will not always be possible to update all our protocol files from a single release without also potentially updating related code (acceptable) and prematurely breaking compatibility with compositors that still only support an earlier incompatible version (unacceptable). The macro in src/CMakeLists.txt has been modified to hopefully make it easier to add new protocol files. This made it necessary to change the name of a few of the generated header files. Closes #2053
This commit is contained in:
@@ -44,12 +44,12 @@
|
||||
#include <poll.h>
|
||||
|
||||
#include "wayland-client-protocol.h"
|
||||
#include "wayland-xdg-shell-client-protocol.h"
|
||||
#include "wayland-xdg-decoration-client-protocol.h"
|
||||
#include "wayland-viewporter-client-protocol.h"
|
||||
#include "wayland-relative-pointer-unstable-v1-client-protocol.h"
|
||||
#include "wayland-pointer-constraints-unstable-v1-client-protocol.h"
|
||||
#include "wayland-idle-inhibit-unstable-v1-client-protocol.h"
|
||||
#include "xdg-shell-client-protocol.h"
|
||||
#include "xdg-decoration-unstable-v1-client-protocol.h"
|
||||
#include "viewporter-client-protocol.h"
|
||||
#include "relative-pointer-unstable-v1-client-protocol.h"
|
||||
#include "pointer-constraints-unstable-v1-client-protocol.h"
|
||||
#include "idle-inhibit-unstable-v1-client-protocol.h"
|
||||
|
||||
#define GLFW_BORDER_SIZE 4
|
||||
#define GLFW_CAPTION_HEIGHT 24
|
||||
@@ -1756,7 +1756,6 @@ static void keyboardHandleModifiers(void* userData,
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION
|
||||
static void keyboardHandleRepeatInfo(void* userData,
|
||||
struct wl_keyboard* keyboard,
|
||||
int32_t rate,
|
||||
@@ -1768,7 +1767,6 @@ static void keyboardHandleRepeatInfo(void* userData,
|
||||
_glfw.wl.keyRepeatRate = rate;
|
||||
_glfw.wl.keyRepeatDelay = delay;
|
||||
}
|
||||
#endif
|
||||
|
||||
static const struct wl_keyboard_listener keyboardListener =
|
||||
{
|
||||
@@ -1777,9 +1775,7 @@ static const struct wl_keyboard_listener keyboardListener =
|
||||
keyboardHandleLeave,
|
||||
keyboardHandleKey,
|
||||
keyboardHandleModifiers,
|
||||
#ifdef WL_KEYBOARD_REPEAT_INFO_SINCE_VERSION
|
||||
keyboardHandleRepeatInfo,
|
||||
#endif
|
||||
};
|
||||
|
||||
static void seatHandleCapabilities(void* userData,
|
||||
|
||||
Reference in New Issue
Block a user