Wayland KDE: Fix abort when pasting into Firefox

Dunno why kwin uses drag and drop callbacks when pasting into Firefox on
Wayland, but then this is Wayland, so every stupid thing imaginable will
be done at least once.

Fixes #5603
This commit is contained in:
Kovid Goyal 2022-10-19 11:28:33 +05:30
parent 0f340086c0
commit f5126c664c
No known key found for this signature in database
GPG Key ID: 06BC317B515ACE7C
2 changed files with 11 additions and 0 deletions

View File

@ -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`) - 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] 0.26.4 [2022-10-17]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

9
glfw/wl_window.c vendored
View File

@ -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); 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 = { static const struct wl_data_source_listener data_source_listener = {
.send = _glfwSendClipboardText, .send = _glfwSendClipboardText,
.cancelled = data_source_canceled, .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 = { static const struct zwp_primary_selection_source_v1_listener primary_selection_source_listener = {