Fix calling XChangeProperty in clipboard provide

XChangeProperty's last parameter is number of elements, not number of bytes as it's in https://tronche.com/gui/x/xlib/window-information/XChangeProperty.html
Because of this bug Paste did not work in any java applications.
This commit is contained in:
Szabolcs Seláf 2017-01-17 15:18:23 +01:00 committed by GitHub
parent 19375dda7a
commit bf4c32c862
1 changed files with 1 additions and 1 deletions

View File

@ -966,7 +966,7 @@ clipboard_provide_selection(XSelectionRequestEvent *req, Atom type, int format,
if (bytes < g_incr_max_req_size)
{
XChangeProperty(g_display, req->requestor, req->property,
type, format, PropModeReplace, (tui8 *)data, bytes);
type, format, PropModeReplace, (tui8 *)data, length);
g_memset(&xev, 0, sizeof(xev));
xev.xselection.type = SelectionNotify;
xev.xselection.send_event = True;