remove watch after all data is received on pipe

This commit is contained in:
Kovid Goyal 2026-02-08 17:10:19 +05:30
parent 5db41c7ba4
commit af4f3969b7
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C

1
glfw/wl_window.c vendored
View file

@ -2536,6 +2536,7 @@ _glfwPlatformReadAvailableDropData(GLFWwindow *w, GLFWDropEvent *ev, char *buffe
if (offer->requested_drop_data[o].fd == fd) {
ssize_t ret;
do { ret = read(fd, buffer, sz); } while (ret < 0 && errno == EINTR);
if (ret <= 0) removeWatch(&_glfw.wl.eventLoopData, offer->requested_drop_data[o].watch_id);
return ret < 0 ? -errno : ret;
}
}