[client] spice: separate clipboard state by direction

This commit is contained in:
Geoffrey McRae
2026-07-28 13:10:38 +10:00
parent e4658b4263
commit a5571f0e9e
4 changed files with 20 additions and 10 deletions

View File

@@ -62,7 +62,8 @@ void cb_spiceNotice(const PSDataType type)
if (!g_state.cbAvailable)
return;
g_state.cbType = type;
atomic_store_explicit(
&g_state.cbRemoteType, type, memory_order_release);
g_state.ds->cbNotice(cb_spiceTypeToLGType(type));
}
@@ -113,6 +114,9 @@ void cb_spiceRelease(void)
if (!g_params.clipboardToLocal)
return;
atomic_store_explicit(
&g_state.cbRemoteType, SPICE_DATA_NONE, memory_order_release);
if (g_state.cbAvailable)
g_state.ds->cbRelease();
}