Wayland: Fix clipboard sharing between kitty instances in containers with isolated PID namespaces

Dont rely on PID alone for the self transfer sentinel.

Fixes #10352
This commit is contained in:
Kovid Goyal 2026-08-12 20:28:49 +05:30
parent 0c932d0b35
commit cea9aeb803
No known key found for this signature in database
GPG key ID: 06BC317B515ACE7C
2 changed files with 4 additions and 2 deletions

View file

@ -205,6 +205,8 @@ Detailed list of changes
- Sessions: Also save/restore layouts other than the currently active layout (:pull:`10324`)
- Wayland: Fix clipboard sharing between kitty instances in containers with isolated PID namespaces (:iss:`10352`)
0.48.2 [2026-07-30]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

4
glfw/wl_window.c vendored
View file

@ -440,8 +440,8 @@ _glfwWaylandAfterBufferSwap(_GLFWwindow *window) {
static const char *
clipboard_mime(void) {
static char buf[128] = {0};
if (buf[0] == 0) { snprintf(buf, sizeof(buf), "application/glfw+clipboard-%d", getpid()); }
static char buf[256] = {0};
if (buf[0] == 0) { snprintf(buf, sizeof(buf), "application/glfw+clipboard-%d-%lld", getpid(), (long long)monotonic_start_time); }
return buf;
}