diff --git a/widget/gtk/WindowSurfaceWayland.cpp b/widget/gtk/WindowSurfaceWayland.cpp index 2bfc0e9a1324..d77a2596818f 100644 --- a/widget/gtk/WindowSurfaceWayland.cpp +++ b/widget/gtk/WindowSurfaceWayland.cpp @@ -242,7 +242,8 @@ global_registry_handler(void *data, wl_registry *registry, uint32_t id, if (strcmp(interface, "wl_shm") == 0) { auto interface = reinterpret_cast(data); auto shm = static_cast( - wl_registry_bind(registry, id, &wl_shm_interface, 1)); + wl_registry_bind(registry, id, &wl_shm_interface, + WL_SHM_POOL_RESIZE_SINCE_VERSION)); wl_proxy_set_queue((struct wl_proxy *)shm, interface->GetEventQueue()); interface->SetShm(shm); } diff --git a/widget/gtk/mozcontainer.cpp b/widget/gtk/mozcontainer.cpp index 2c9c599b7918..27a3619857d0 100644 --- a/widget/gtk/mozcontainer.cpp +++ b/widget/gtk/mozcontainer.cpp @@ -180,9 +180,9 @@ registry_handle_global (void *data, if(strcmp(interface, "wl_subcompositor") == 0) { container->subcompositor = static_cast(wl_registry_bind(registry, - name, - &wl_subcompositor_interface, - 1)); + name, + &wl_subcompositor_interface, + WL_SUBCOMPOSITOR_GET_SUBSURFACE_SINCE_VERSION)); } } diff --git a/widget/gtk/nsClipboardWayland.cpp b/widget/gtk/nsClipboardWayland.cpp index 0a99838fa1c3..eb1b7916f1db 100644 --- a/widget/gtk/nsClipboardWayland.cpp +++ b/widget/gtk/nsClipboardWayland.cpp @@ -712,7 +712,10 @@ nsRetrievalContextWayland::InitDataDeviceManager(wl_registry *registry, uint32_t id, uint32_t version) { - int data_device_manager_version = MIN (version, 3); + // The documentation is pretty mean according wl_data_device_manager versions. + // We should be fine with version 1 but Gtk+ uses this construction + // so let's follow them. + int data_device_manager_version = MIN(version, 3); mDataDeviceManager = (wl_data_device_manager *)wl_registry_bind(registry, id, &wl_data_device_manager_interface, data_device_manager_version); } @@ -723,7 +726,8 @@ nsRetrievalContextWayland::InitPrimarySelectionDataDeviceManager( { mPrimarySelectionDataDeviceManager = (gtk_primary_selection_device_manager *)wl_registry_bind(registry, id, - >k_primary_selection_device_manager_interface, 1); + >k_primary_selection_device_manager_interface, + /* First version of gtk_primary_selection extension */ 1); } void @@ -731,7 +735,8 @@ nsRetrievalContextWayland::InitSeat(wl_registry *registry, uint32_t id, uint32_t version, void *data) { - mSeat = (wl_seat*)wl_registry_bind(registry, id, &wl_seat_interface, 1); + mSeat = (wl_seat*)wl_registry_bind(registry, id, &wl_seat_interface, + WL_SEAT_CAPABILITIES_SINCE_VERSION); } static void diff --git a/widget/gtk/nsGtkKeyUtils.cpp b/widget/gtk/nsGtkKeyUtils.cpp index e5708ea644dc..56f68e8b8126 100644 --- a/widget/gtk/nsGtkKeyUtils.cpp +++ b/widget/gtk/nsGtkKeyUtils.cpp @@ -612,7 +612,8 @@ gdk_registry_handle_global(void *data, { if (strcmp(interface, "wl_seat") == 0) { wl_seat *seat = - (wl_seat*)wl_registry_bind(registry, id, &wl_seat_interface, 1); + (wl_seat*)wl_registry_bind(registry, id, &wl_seat_interface, + WL_SEAT_CAPABILITIES_SINCE_VERSION); wl_seat_add_listener(seat, &seat_listener, data); } }