diff options
author | Carlos Garnacho <carlosg@gnome.org> | 2020-04-10 17:08:26 +0200 |
---|---|---|
committer | Robert Mader <robert.mader@posteo.de> | 2020-04-16 16:26:04 +0000 |
commit | 06d67b6abfd4d5ed8ceecd998b08cd1103946f26 (patch) | |
tree | aa633e44526d9304b91f9f4e12ec2b21ae5d9fb9 | |
parent | f15ce01e2b48ec0127367392d6d49153fadea087 (diff) | |
download | mutter-06d67b6abfd4d5ed8ceecd998b08cd1103946f26.tar.gz |
x11: XMaxRequestSize returns 4-byte units
XMaxRequestSize/XMaxExtendedRequestSize are documented to return
the maximum size in 4-byte units, whereas we are comparing this
to byte lenghts. We can afford 4x the data here.
Since I don't know the payload size of the XChangeProperty request,
be generous and allot 400 bytes for it, we have some to spare.
https://gitlab.gnome.org/GNOME/mutter/-/merge_requests/1198
-rw-r--r-- | src/x11/meta-x11-selection-output-stream.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/x11/meta-x11-selection-output-stream.c b/src/x11/meta-x11-selection-output-stream.c index f51dbc4c3..a3ac76629 100644 --- a/src/x11/meta-x11-selection-output-stream.c +++ b/src/x11/meta-x11-selection-output-stream.c @@ -110,7 +110,7 @@ get_max_request_size (MetaX11Display *display) if (size <= 0) size = XMaxRequestSize (display->xdisplay); - return size - 100; + return (size - 100) * 4; } static gboolean |