diff --git a/docs/changelog.rst b/docs/changelog.rst index 8576b85db..8ae854931 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -40,6 +40,8 @@ Detailed list of changes - Fix a regression in the previous release that caused a :opt:`resize_draw_strategy` of ``static`` to not work (:iss:`5601`) +- Wayland KDE: Fix abort when pasting into Firefox (:iss:`5603`) + 0.26.4 [2022-10-17] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ diff --git a/glfw/wl_window.c b/glfw/wl_window.c index 95eca536a..0f3de081e 100644 --- a/glfw/wl_window.c +++ b/glfw/wl_window.c @@ -1691,9 +1691,18 @@ static void primary_selection_source_canceled(void *data UNUSED, struct zwp_prim zwp_primary_selection_source_v1_destroy(primary_selection_source); } +// KWin aborts if we don't define these even though they are not used for copy/paste +static void dummy_data_source_target(void* data UNUSED, struct wl_data_source* wl_data_source UNUSED, const char* mime_type UNUSED) { +} + +static void dummy_data_source_action(void* data UNUSED, struct wl_data_source* wl_data_source UNUSED, uint dnd_action UNUSED) { +} + static const struct wl_data_source_listener data_source_listener = { .send = _glfwSendClipboardText, .cancelled = data_source_canceled, + .target = dummy_data_source_target, + .action = dummy_data_source_action, }; static const struct zwp_primary_selection_source_v1_listener primary_selection_source_listener = {