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:
Camilla Löwy
2023-12-05 23:03:25 +01:00
parent 73948e6c0f
commit 2c3eb75748
14 changed files with 5497 additions and 117 deletions

View File

@@ -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,