summaryrefslogtreecommitdiff
path: root/src/drivers
diff options
context:
space:
mode:
authorManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-25 10:25:34 +0200
committerManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com>2023-04-25 10:25:34 +0200
commit8489a245ee8c6cf2afbf7f634ce89b2cb99b5050 (patch)
treee87f7519602435bb3fdd4cd51d5988375022075e /src/drivers
parent1ae25242bd999e9f6934077f56159fed712dfb7b (diff)
Wayland: accept all data_device_manager protocol versions
Diffstat (limited to 'src/drivers')
-rw-r--r--src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
index 54190cc2a..79e9df372 100644
--- a/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
+++ b/src/drivers/Wayland/Fl_Wayland_Screen_Driver.cxx
@@ -44,6 +44,7 @@ extern "C" {
#define fl_max(a,b) ((a) > (b) ? (a) : (b))
+#define fl_min(a,b) ((a) < (b) ? (a) : (b))
struct pointer_output {
Fl_Wayland_Screen_Driver::output* output;
@@ -1071,7 +1072,7 @@ static void registry_handle_global(void *user_data, struct wl_registry *wl_regis
} else if (strcmp(interface, wl_data_device_manager_interface.name) == 0) {
if (!scr_driver->seat) scr_driver->seat = (struct Fl_Wayland_Screen_Driver::seat*)calloc(1, sizeof(struct Fl_Wayland_Screen_Driver::seat));
- scr_driver->seat->data_device_manager = (struct wl_data_device_manager*)wl_registry_bind(wl_registry, id, &wl_data_device_manager_interface, 3);
+ scr_driver->seat->data_device_manager = (struct wl_data_device_manager*)wl_registry_bind(wl_registry, id, &wl_data_device_manager_interface, fl_min(version, 3));
if (scr_driver->seat->wl_seat) {
scr_driver->seat->data_device = wl_data_device_manager_get_data_device(scr_driver->seat->data_device_manager, scr_driver->seat->wl_seat);
wl_data_device_add_listener(scr_driver->seat->data_device, Fl_Wayland_Screen_Driver::p_data_device_listener, NULL);