Preserve granted clipboard capability across locked-session handshake and test closed state

This commit is contained in:
VallierDev committed 2026-10-15 02:10:59 +08:00
1 parent a18a69c19e
commit 66c8bb3249
4 files changed
+116 -1

No files matched your search

+1
View File
@@ -94,6 +94,7 @@ static void selection_transfer(GDBusConnection *bus,const gchar *sender,const gc
g_variant_new("(oub)",p->session,serial,success),NULL,G_DBUS_CALL_FLAGS_NONE,2000,NULL,NULL);
if (reply) g_variant_unref(reply);
}
int uu_portal_clipboard_supported(struct uu_portal *p) { return p && p->clipboard_enabled; }
int uu_portal_clipboard_ready(struct uu_portal *p) { return p && p->clipboard_enabled && uu_portal_alive(p); }
int uu_portal_clipboard_set(struct uu_portal *p,const uint8_t *text,size_t length) {
if (!uu_portal_clipboard_ready(p) || length>CLIP_LIMIT || !g_utf8_validate((const char *)text,(gssize)length,NULL)) return -1;