Changeset 106786 in vbox for trunk/src/VBox/Additions
- Timestamp:
- Oct 30, 2024 11:33:02 AM (3 months ago)
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 8 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/clipboard-common.cpp
r106061 r106786 41 41 #include "VBoxClient.h" 42 42 #include "clipboard.h" 43 44 RTDECL(int) VBClClipboardThreadStart(PRTTHREAD pThread, PFNRTTHREAD pfnThread, const char *pszName, void *pvUser)45 {46 int rc;47 48 rc = RTThreadCreate(pThread, pfnThread, pvUser, 0, RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, pszName);49 if (RT_SUCCESS(rc))50 rc = RTThreadUserWait(*pThread, RT_MS_30SEC /* msTimeout */);51 52 if (RT_SUCCESS(rc))53 VBClLogVerbose(1, "started %s thread\n", pszName);54 else55 LogRel(("unable to start %s thread, rc=%Rrc\n", pszName, rc));56 57 return rc;58 }59 43 60 44 RTDECL(int) VBClClipboardReadHostEvent(PSHCLCONTEXT pCtx, const PFNHOSTCLIPREPORTFMTS pfnHGClipReport, -
trunk/src/VBox/Additions/x11/VBoxClient/clipboard.h
r106061 r106786 84 84 85 85 /** 86 * Create thread and wait until it started.87 *88 * @returns IPRT status code.89 * @param pThread Pointer to thread data.90 * @param pfnThread Pointer to thread main loop function.91 * @param pszName Thread name.92 * @param pvUser User data.93 */94 RTDECL(int) VBClClipboardThreadStart(PRTTHREAD pThread, PFNRTTHREAD pfnThread, const char *pszName, void *pvUser);95 96 /**97 86 * Read and process one event from the host clipboard service. 98 87 * -
trunk/src/VBox/Additions/x11/VBoxClient/vboxwl.cpp
r106061 r106786 573 573 RTLOCALIPCSESSION hIpcSession; 574 574 575 rc = VBClClipboardThreadStart(&g_AppThread, vboxwl_gtk_worker, "gtk-app", NULL);575 rc = vbcl_wayland_thread_start(&g_AppThread, vboxwl_gtk_worker, "gtk-app", NULL); 576 576 if (RT_SUCCESS(rc)) 577 577 { -
trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper-dcp.cpp
r106771 r106786 1275 1275 vbcl_wayland_session_init(&g_DcpCtx.Session.Base); 1276 1276 1277 return VBClClipboardThreadStart(&g_DcpCtx.Thread, vbcl_wayland_hlp_dcp_event_loop, "wl-dcp", &g_DcpCtx);1277 return vbcl_wayland_thread_start(&g_DcpCtx.Thread, vbcl_wayland_hlp_dcp_event_loop, "wl-dcp", &g_DcpCtx); 1278 1278 } 1279 1279 -
trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper-gtk.cpp
r106771 r106786 410 410 RT_ZERO(g_GtkCtx); 411 411 412 return VBClClipboardThreadStart(&g_GtkCtx.Thread, vbcl_wayland_hlp_gtk_worker, "wl-gtk-ipc", &g_GtkCtx);412 return vbcl_wayland_thread_start(&g_GtkCtx.Thread, vbcl_wayland_hlp_gtk_worker, "wl-gtk-ipc", &g_GtkCtx); 413 413 } 414 414 -
trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper.cpp
r106061 r106786 315 315 return RT_BOOL(ASMAtomicReadU8((volatile uint8_t *)&pSession->enmState) == VBCL_WL_SESSION_STATE_STARTED); 316 316 } 317 318 RTDECL(int) vbcl_wayland_thread_start(PRTTHREAD pThread, PFNRTTHREAD pfnThread, const char *pszName, void *pvUser) 319 { 320 int rc; 321 322 rc = RTThreadCreate(pThread, pfnThread, pvUser, 0, RTTHREADTYPE_IO, RTTHREADFLAGS_WAITABLE, pszName); 323 if (RT_SUCCESS(rc)) 324 rc = RTThreadUserWait(*pThread, RT_MS_30SEC /* msTimeout */); 325 326 if (RT_SUCCESS(rc)) 327 VBClLogVerbose(1, "started %s thread\n", pszName); 328 else 329 LogRel(("unable to start %s thread, rc=%Rrc\n", pszName, rc)); 330 331 return rc; 332 } 333 -
trunk/src/VBox/Additions/x11/VBoxClient/wayland-helper.h
r106753 r106786 399 399 RTDECL(bool) vbcl_wayland_session_is_started(vbcl_wl_session_t *pSession); 400 400 401 /** 402 * Create thread and wait until it started. 403 * 404 * @returns IPRT status code. 405 * @param pThread Pointer to thread data. 406 * @param pfnThread Pointer to thread main loop function. 407 * @param pszName Thread name. 408 * @param pvUser User data. 409 */ 410 RTDECL(int) vbcl_wayland_thread_start(PRTTHREAD pThread, PFNRTTHREAD pfnThread, const char *pszName, void *pvUser); 411 401 412 /** Wayland helper which uses GTK library. */ 402 413 extern const VBCLWAYLANDHELPER g_WaylandHelperGtk; -
trunk/src/VBox/Additions/x11/VBoxClient/wayland.cpp
r106753 r106786 309 309 if (RT_VALID_PTR(g_pWaylandHelperClipboard)) 310 310 { 311 rc = VBClClipboardThreadStart(&g_ClipboardThread, vbclWaylandClipboardWorker, "wl-clip", NULL);311 rc = vbcl_wayland_thread_start(&g_ClipboardThread, vbclWaylandClipboardWorker, "wl-clip", NULL); 312 312 VBClLogVerbose(1, "clipboard thread started, rc=%Rrc\n", rc); 313 313 } … … 317 317 && RT_VALID_PTR(g_pWaylandHelperDnd)) 318 318 { 319 rc = VBClClipboardThreadStart(&g_DndThread, vbclWaylandDndWorker, "wl-dnd", NULL);319 rc = vbcl_wayland_thread_start(&g_DndThread, vbclWaylandDndWorker, "wl-dnd", NULL); 320 320 VBClLogVerbose(1, "DnD thread started, rc=%Rrc\n", rc); 321 321 } … … 324 324 if (RT_SUCCESS(rc)) 325 325 { 326 rc = VBClClipboardThreadStart(&g_HostInputFocusThread, vbclWaylandHostInputFocusWorker, "wl-focus", NULL);326 rc = vbcl_wayland_thread_start(&g_HostInputFocusThread, vbclWaylandHostInputFocusWorker, "wl-focus", NULL); 327 327 VBClLogVerbose(1, "host input focus polling thread started, rc=%Rrc\n", rc); 328 328 }
Note:
See TracChangeset
for help on using the changeset viewer.