Changeset 106790 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Oct 30, 2024 1:21:47 PM (3 months ago)
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/vboxwl.cpp
r106788 r106790 133 133 if (RT_SUCCESS(rc)) 134 134 { 135 g_oDataIpc->m_pv ClipboardBuf.set((uint64_t)pvBufOut);136 g_oDataIpc->m_cb ClipboardBuf.set((uint64_t)cbBufOut);135 g_oDataIpc->m_pvDataBuf.set((uint64_t)pvBufOut); 136 g_oDataIpc->m_cbDataBuf.set((uint64_t)cbBufOut); 137 137 g_tsGtkQuit = RTTimeMilliTS(); 138 138 } … … 277 277 278 278 /* Wait for the host to send clipboard data in requested format. */ 279 uint32_t cbBuf = g_oDataIpc->m_cb ClipboardBuf.wait();280 void *pvBuf = (void *)g_oDataIpc->m_pv ClipboardBuf.wait();281 282 if ( cbBuf != g_oDataIpc->m_cb ClipboardBuf.defaults()283 && pvBuf != (void *)g_oDataIpc->m_pv ClipboardBuf.defaults())279 uint32_t cbBuf = g_oDataIpc->m_cbDataBuf.wait(); 280 void *pvBuf = (void *)g_oDataIpc->m_pvDataBuf.wait(); 281 282 if ( cbBuf != g_oDataIpc->m_cbDataBuf.defaults() 283 && pvBuf != (void *)g_oDataIpc->m_pvDataBuf.defaults()) 284 284 { 285 285 void *pBufOut; -
trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper-dcp.cpp
r106786 r106790 118 118 119 119 /** Clipboard buffer which contains requested data. */ 120 vbcl::Waitable<volatile uint64_t> pv ClipboardBuf;120 vbcl::Waitable<volatile uint64_t> pvDataBuf; 121 121 122 122 /** Size of clipboard buffer. */ 123 vbcl::Waitable<volatile uint32_t> cb ClipboardBuf;123 vbcl::Waitable<volatile uint32_t> cbDataBuf; 124 124 } clip; 125 125 } vbox_wl_dcp_session_t; … … 473 473 } 474 474 475 pvData = (void *)pSession->clip.pv ClipboardBuf.reset();475 pvData = (void *)pSession->clip.pvDataBuf.reset(); 476 476 if (RT_VALID_PTR(pvData)) 477 477 RTMemFree(pvData); … … 489 489 pSession->clip.fFmts.init(VBOX_SHCL_FMT_NONE, VBCL_WAYLAND_VALUE_WAIT_TIMEOUT_MS); 490 490 pSession->clip.uFmt.init(VBOX_SHCL_FMT_NONE, VBCL_WAYLAND_VALUE_WAIT_TIMEOUT_MS); 491 pSession->clip.pv ClipboardBuf.init(0, VBCL_WAYLAND_DATA_WAIT_TIMEOUT_MS);492 pSession->clip.cb ClipboardBuf.init(0, VBCL_WAYLAND_DATA_WAIT_TIMEOUT_MS);491 pSession->clip.pvDataBuf.init(0, VBCL_WAYLAND_DATA_WAIT_TIMEOUT_MS); 492 pSession->clip.cbDataBuf.init(0, VBCL_WAYLAND_DATA_WAIT_TIMEOUT_MS); 493 493 } 494 494 … … 772 772 if (RT_SUCCESS(rc)) 773 773 { 774 pCtx->Session.clip.pv ClipboardBuf.set((uint64_t)pvBufOut);775 pCtx->Session.clip.cb ClipboardBuf.set((uint64_t)cbBufOut);774 pCtx->Session.clip.pvDataBuf.set((uint64_t)pvBufOut); 775 pCtx->Session.clip.cbDataBuf.set((uint64_t)cbBufOut); 776 776 } 777 777 … … 1356 1356 1357 1357 /* Wait for data in requested format. */ 1358 pvBuf = (void *)g_DcpCtx.Session.clip.pv ClipboardBuf.wait();1359 cbBuf = g_DcpCtx.Session.clip.cb ClipboardBuf.wait();1360 if ( cbBuf != g_DcpCtx.Session.clip.cb ClipboardBuf.defaults()1361 && pvBuf != (void *)g_DcpCtx.Session.clip.pv ClipboardBuf.defaults())1358 pvBuf = (void *)g_DcpCtx.Session.clip.pvDataBuf.wait(); 1359 cbBuf = g_DcpCtx.Session.clip.cbDataBuf.wait(); 1360 if ( cbBuf != g_DcpCtx.Session.clip.cbDataBuf.defaults() 1361 && pvBuf != (void *)g_DcpCtx.Session.clip.pvDataBuf.defaults()) 1362 1362 { 1363 1363 void *pvBufOut; … … 1516 1516 { 1517 1517 /* Set clipboard data to the session. */ 1518 g_DcpCtx.Session.clip.pv ClipboardBuf.set((uint64_t)pvData);1519 g_DcpCtx.Session.clip.cb ClipboardBuf.set((uint64_t)cbData);1518 g_DcpCtx.Session.clip.pvDataBuf.set((uint64_t)pvData); 1519 g_DcpCtx.Session.clip.cbDataBuf.set((uint64_t)cbData); 1520 1520 } 1521 1521 } … … 1595 1595 1596 1596 /* Wait for data in requested format. */ 1597 pvData = (void *)g_DcpCtx.Session.clip.pv ClipboardBuf.wait();1598 cbData = g_DcpCtx.Session.clip.cb ClipboardBuf.wait();1599 if ( cbData != g_DcpCtx.Session.clip.cb ClipboardBuf.defaults()1600 && pvData != (void *)g_DcpCtx.Session.clip.pv ClipboardBuf.defaults())1597 pvData = (void *)g_DcpCtx.Session.clip.pvDataBuf.wait(); 1598 cbData = g_DcpCtx.Session.clip.cbDataBuf.wait(); 1599 if ( cbData != g_DcpCtx.Session.clip.cbDataBuf.defaults() 1600 && pvData != (void *)g_DcpCtx.Session.clip.pvDataBuf.defaults()) 1601 1601 { 1602 1602 /* Send clipboard data to the host. */ -
trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper-gtk.cpp
r106788 r106790 549 549 if (RT_SUCCESS(rc)) 550 550 { 551 g_GtkCtx.Session.oDataIpc->m_pv ClipboardBuf.set((uint64_t)pvData);552 g_GtkCtx.Session.oDataIpc->m_cb ClipboardBuf.set((uint64_t)cbData);551 g_GtkCtx.Session.oDataIpc->m_pvDataBuf.set((uint64_t)pvData); 552 g_GtkCtx.Session.oDataIpc->m_cbDataBuf.set((uint64_t)cbData); 553 553 } 554 554 } … … 623 623 624 624 /* Wait for data in requested format. */ 625 pvData = (void *)g_GtkCtx.Session.oDataIpc->m_pv ClipboardBuf.wait();626 cbData = g_GtkCtx.Session.oDataIpc->m_cb ClipboardBuf.wait();627 if ( cbData != g_GtkCtx.Session.oDataIpc->m_cb ClipboardBuf.defaults()628 && pvData != (void *)g_GtkCtx.Session.oDataIpc->m_pv ClipboardBuf.defaults())625 pvData = (void *)g_GtkCtx.Session.oDataIpc->m_pvDataBuf.wait(); 626 cbData = g_GtkCtx.Session.oDataIpc->m_cbDataBuf.wait(); 627 if ( cbData != g_GtkCtx.Session.oDataIpc->m_cbDataBuf.defaults() 628 && pvData != (void *)g_GtkCtx.Session.oDataIpc->m_pvDataBuf.defaults()) 629 629 { 630 630 /* Send clipboard data to the host. */ -
trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper-ipc.cpp
r106789 r106790 367 367 uint32_t cbData; 368 368 369 cbData = m_cb ClipboardBuf.wait();370 pvData = (void *)m_pv ClipboardBuf.wait();371 if ( cbData != m_cb ClipboardBuf.defaults()372 && pvData != (void *)m_pv ClipboardBuf.defaults())369 cbData = m_cbDataBuf.wait(); 370 pvData = (void *)m_pvDataBuf.wait(); 371 if ( cbData != m_cbDataBuf.defaults() 372 && pvData != (void *)m_pvDataBuf.defaults()) 373 373 { 374 374 pPacket = (vbcl::ipc::data::data_packet_t *)RTMemAllocZ(sizeof(vbcl::ipc::data::data_packet_t) + cbData); … … 415 415 { 416 416 memcpy(pvData, (uint8_t *)pPacket + sizeof(vbcl::ipc::data::data_packet_t), pPacket->cbData); 417 m_pv ClipboardBuf.set((uint64_t)pvData);417 m_pvDataBuf.set((uint64_t)pvData); 418 418 cbData = pPacket->cbData; 419 m_cb ClipboardBuf.set(cbData);419 m_cbDataBuf.set(cbData); 420 420 } 421 421 else -
trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper-ipc.h
r106789 r106790 242 242 m_fFmts.init(VBOX_SHCL_FMT_NONE, VBCL_WAYLAND_VALUE_WAIT_TIMEOUT_MS); 243 243 m_uFmt.init(VBOX_SHCL_FMT_NONE, VBCL_WAYLAND_VALUE_WAIT_TIMEOUT_MS); 244 m_pv ClipboardBuf.init(0, VBCL_WAYLAND_DATA_WAIT_TIMEOUT_MS);245 m_cb ClipboardBuf.init(0, VBCL_WAYLAND_DATA_WAIT_TIMEOUT_MS);244 m_pvDataBuf.init(0, VBCL_WAYLAND_DATA_WAIT_TIMEOUT_MS); 245 m_cbDataBuf.init(0, VBCL_WAYLAND_DATA_WAIT_TIMEOUT_MS); 246 246 m_fServer = fServer; 247 247 m_uSessionId = uSessionId; … … 253 253 void reset() 254 254 { 255 void *pvData = (void *)m_pv ClipboardBuf.reset();255 void *pvData = (void *)m_pvDataBuf.reset(); 256 256 if (RT_VALID_PTR(pvData)) 257 257 RTMemFree(pvData); … … 259 259 m_fFmts.reset(); 260 260 m_uFmt.reset(); 261 m_cb ClipboardBuf.reset();261 m_cbDataBuf.reset(); 262 262 } 263 263 … … 287 287 Waitable<volatile SHCLFORMATS> m_fFmts; 288 288 Waitable<volatile SHCLFORMAT> m_uFmt; 289 Waitable<volatile uint64_t> m_pv ClipboardBuf;290 Waitable<volatile uint32_t> m_cb ClipboardBuf;289 Waitable<volatile uint64_t> m_pvDataBuf; 290 Waitable<volatile uint32_t> m_cbDataBuf; 291 291 292 292 protected:
Note:
See TracChangeset
for help on using the changeset viewer.