summaryrefslogtreecommitdiff
path: root/src/x11/meta-selection-source-x11.c
diff options
context:
space:
mode:
authorSebastian Keller <skeller@gnome.org>2021-04-05 01:06:38 +0200
committerSebastian Keller <skeller@gnome.org>2022-01-07 02:21:28 +0100
commitdbd6e74d3c3fcfde45fd561814a71d35f40f48f5 (patch)
treeb052a6f044e2e3b516b749744f975a49655bad18 /src/x11/meta-selection-source-x11.c
parentd25175b91ca92f65a5628e7757b759b4052b495c (diff)
downloadmutter-dbd6e74d3c3fcfde45fd561814a71d35f40f48f5.tar.gz
x11: Let selection input streams create their own window
When there are two (or more) concurrent XConvertSelection requests with the same target, selection and window and the data is large enough for SelectionNotify events to overlap. This can result in the affected streams being considered completed without any data being transferred. While regular mutter/shell code does not make use of concurrent XConvertSelection requests with the same targets, some extensions might. Such as for example a clipboard manager that like the built-in clipboard manager tries to read the selection on owner-changed. One potential solution would be to make sure the event is for the correct property, but not all clients seem to support concurrent requests for the same targets but different properties on the same window. This commit instead changes the streams to use their own window which seems to be more widely supported. Fixes https://gitlab.gnome.org/GNOME/gnome-shell/-/issues/4034 Part-of: <https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1812>
Diffstat (limited to 'src/x11/meta-selection-source-x11.c')
-rw-r--r--src/x11/meta-selection-source-x11.c2
1 files changed, 0 insertions, 2 deletions
diff --git a/src/x11/meta-selection-source-x11.c b/src/x11/meta-selection-source-x11.c
index c9fc8fbc6..15f46a144 100644
--- a/src/x11/meta-selection-source-x11.c
+++ b/src/x11/meta-selection-source-x11.c
@@ -92,7 +92,6 @@ meta_selection_source_x11_read_async (MetaSelectionSource *source,
mimetype = "UTF8_STRING";
meta_x11_selection_input_stream_new_async (source_x11->x11_display,
- source_x11->x11_display->selection.xwindow,
gdk_x11_get_xatom_name (source_x11->xselection),
mimetype,
source_x11->timestamp,
@@ -251,7 +250,6 @@ meta_selection_source_x11_new_async (MetaX11Display *x11_display,
g_task_set_task_data (task, source, g_object_unref);
meta_x11_selection_input_stream_new_async (x11_display,
- x11_display->selection.xwindow,
gdk_x11_get_xatom_name (xselection),
"TARGETS",
timestamp,