weston/xwayland
Derek Foreman aa507417c2 xwm: Fix pasting in some cases
I guess this reverts commit 73bdc0ce85
"xwm: Fix fd leak in weston_wm_send_data()"

That commit closes the send half of a pipe in weston_wm_send_data,
claiming that it's dup()licated later, and we'll leak the fd if
we don't close it.

That may have been true at the time? But currently that fd is only
duplicated by wl_event_loop_add_fd() in its normal operation, and
closing our original before that fd handler ever fires results
in an EBADF on write, and the data never reaching its intended
destination.

Worse, by the time that handler is called there might be another
use for that fd, and we could push data into it and close it.

To provoke the problem, launch an app like FireFox over Xwayland,
cut something to the clipboard, then close the app (this is the
path where the wm has stored the clipboard contents and the
app has gone away). relaunch it and paste the clipboard content
back in. clipboard_client_data() will EBADF on write, and the
data won't be pasted.

Reported-by: Hideyuki Nagase <hideyukn@microsoft.com>
Signed-off-by: Derek Foreman <derek.foreman@collabora.com>
2022-05-31 17:57:03 +00:00
..
dnd.c libweston: correct argument name in the handler of wl_data_source.accept 2022-04-14 12:05:57 +00:00
hash.c Make config.h inclusion consistent 2016-06-16 11:01:54 -07:00
hash.h include stdint.h for int32_t/uint32_t 2016-07-26 16:26:08 -07:00
launcher.c xwayland: Fix user after free on shutdown 2022-01-21 11:42:03 +00:00
meson.build xwayland: Pass -listenfd instead of -listen <fd> 2021-03-04 09:35:55 +00:00
selection.c xwm: Fix pasting in some cases 2022-05-31 17:57:03 +00:00
window-manager.c xwayland: Honour the XCURSOR_THEME environment variable 2022-04-20 08:23:19 +00:00
xwayland-internal-interface.h Allow programmatically closing xwayland window 2021-07-23 19:40:00 +00:00
xwayland.h xwm: no need for compositor/weston.h 2019-10-04 17:14:22 +03:00