x11: Always update clipboard owner

This allows utilities like clipboard managers to keep track of the
changes.

(cherry picked from commit 65aaf3a9ab)
This commit is contained in:
Guldoman 2023-09-15 02:01:08 +02:00 committed by Sam Lantinga
parent a8b9414697
commit 70a2ac2f1c
1 changed files with 1 additions and 4 deletions

View File

@ -132,10 +132,7 @@ static int SetSelectionText(_THIS, const char *text, Atom selection_type)
X11_GetSDLCutBufferClipboardInternalFormat(display, SDL_X11_CLIPBOARD_MIME_TYPE_STRING), 8, PropModeReplace,
(const unsigned char *)text, SDL_strlen(text));
if (X11_XGetSelectionOwner(display, selection_type) != window) {
X11_XSetSelectionOwner(display, selection_type, window, CurrentTime);
}
X11_XSetSelectionOwner(display, selection_type, window, CurrentTime);
return 0;
}