mirror of
https://github.com/kovidgoyal/kitty.git
synced 2026-10-24 14:12:02 +00:00
Linux: Fix regression that broke drag and drop from GTK applications
Fixes #9656
This commit is contained in:
parent
a97f468a02
commit
e72f49952d
3 changed files with 5 additions and 2 deletions
|
|
@ -182,6 +182,8 @@ Detailed list of changes
|
|||
|
||||
- Wayland: Fix momentum scrolling not working on compositors that send a stop frame with no axis information (:iss:`9653`)
|
||||
|
||||
- Linux: Fix regression that broke drag and drop from GTK applications (:iss:`9656`)
|
||||
|
||||
0.46.0 [2026-03-11]
|
||||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
|
||||
|
|
|
|||
2
glfw/wl_window.c
vendored
2
glfw/wl_window.c
vendored
|
|
@ -2577,7 +2577,7 @@ _glfwPlatformReadAvailableDropData(GLFWwindow *w, GLFWDropEvent *ev, char *buffe
|
|||
for (size_t o = 0; o < offer->dd_count; o++) {
|
||||
if (offer->requested_drop_data[o].fd == fd) {
|
||||
ssize_t ret;
|
||||
do { ret = read(fd, buffer, sz); } while (ret < 0 && errno == EINTR);
|
||||
do { ret = read(fd, buffer, sz); } while (ret < 0 && (errno == EINTR || errno == EAGAIN));
|
||||
if (ret <= 0) removeWatch(&_glfw.wl.eventLoopData, offer->requested_drop_data[o].watch_id);
|
||||
return ret < 0 ? -errno : ret;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -729,7 +729,7 @@ update_allowed_mimes_for_drop(GLFWDropEvent *ev) {
|
|||
}
|
||||
}
|
||||
if (prio_arr != priorities) free(prio_arr);
|
||||
ev->num_mimes = remove_duplicate_mimes(ev->mimes, new_count);
|
||||
ev->num_mimes = new_count;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -799,6 +799,7 @@ on_drop(GLFWwindow *window, GLFWDropEvent *ev) {
|
|||
break;
|
||||
}
|
||||
update_allowed_mimes_for_drop(ev);
|
||||
ev->num_mimes = remove_duplicate_mimes(ev->mimes, ev->num_mimes);
|
||||
global_state.drop_dest.num_left = ev->num_mimes;
|
||||
if (!global_state.drop_dest.num_left || !(global_state.drop_dest.data = PyDict_New())) {
|
||||
ev->finish_drop(window, GLFW_DRAG_OPERATION_GENERIC);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue