Skip to content

Commit 85df36d

Browse files
committed
VBoxClient: Made pfnPopup optional, since it's only needed by the 'gtk' backend. buref:10194
svn:sync-xref-src-repo-rev: r174569
1 parent c91bc10 commit 85df36d

3 files changed

Lines changed: 11 additions & 15 deletions

File tree

src/VBox/Additions/x11/VBoxClient/wayland-helper-edcp.cpp

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: wayland-helper-edcp.cpp 114620 2026-07-04 00:00:20Z knut.osmundsen@oracle.com $ */
1+
/* $Id: wayland-helper-edcp.cpp 114732 2026-07-20 13:04:35Z knut.osmundsen@oracle.com $ */
22
/** @file
33
* Guest Additions - Ext Data Control Protocol (EDCP) helper for Wayland.
44
*
@@ -831,14 +831,6 @@ static DECLCALLBACK(void) vbcl_wayland_hlp_edcp_clip_set_ctx(PSHCLCONTEXT pCtx)
831831
g_EdcpCtx.BaseCtx.pShClCtx = pCtx;
832832
}
833833

834-
/**
835-
* @interface_method_impl{VBCLWAYLANDHELPER_CLIPBOARD,pfnPopup}
836-
*/
837-
static DECLCALLBACK(int) vbcl_wayland_hlp_edcp_clip_popup(void)
838-
{
839-
return VINF_SUCCESS;
840-
}
841-
842834
/**
843835
* @callback_method_impl{FNVBCLWAYLANDSESSIONJOIN,
844836
* Session callback: Copy clipboard from the host.}
@@ -902,7 +894,7 @@ const VBCLWAYLANDHELPER g_WaylandHelperEdcp =
902894
/* .pfnInit = */ vbcl_wayland_hlp_edcp_clip_init,
903895
/* .pfnTerm = */ vbcl_wayland_hlp_edcp_clip_term,
904896
/* .pfnSetClipboardCtx = */ vbcl_wayland_hlp_edcp_clip_set_ctx,
905-
/* .pfnPopup = */ vbcl_wayland_hlp_edcp_clip_popup,
897+
/* .pfnPopup = */ NULL,
906898
/* .pfnHGClipReport = */ vbcl_wayland_hlp_edcp_clip_hg_report,
907899
/* .pfnGHClipRead = */ NULL,
908900
},

src/VBox/Additions/x11/VBoxClient/wayland-helper.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: wayland-helper.h 114464 2026-06-21 01:25:02Z knut.osmundsen@oracle.com $ */
1+
/* $Id: wayland-helper.h 114732 2026-07-20 13:04:35Z knut.osmundsen@oracle.com $ */
22
/** @file
33
* Guest Additions - Definitions for Wayland helpers.
44
*/
@@ -167,6 +167,7 @@ typedef struct
167167
* Callback to force guest to announce its clipboard content.
168168
*
169169
* @returns IPRT status code.
170+
* @note Optional. Only needed by plain Wayland/Gtk.
170171
*/
171172
DECLCALLBACKMEMBER(int, pfnPopup, (void));
172173

src/VBox/Additions/x11/VBoxClient/wayland.cpp

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: wayland.cpp 114626 2026-07-04 01:32:49Z knut.osmundsen@oracle.com $ */
1+
/* $Id: wayland.cpp 114732 2026-07-20 13:04:35Z knut.osmundsen@oracle.com $ */
22
/** @file
33
* Guest Additions - Wayland Desktop Environment assistant.
44
*/
@@ -545,11 +545,14 @@ static DECLCALLBACK(int) vbclWaylandWorker(bool volatile *pfShutdown)
545545
}
546546
#endif
547547

548-
/* Start polling host input focus events. */
549-
if (RT_SUCCESS(rc))
548+
/* Start waiting host input focus events (only basic Wayland clipboard protocol
549+
requires this, thus the pfnPopup check). */
550+
if ( RT_SUCCESS(rc)
551+
&& g_pWaylandHelperClipboard
552+
&& g_pWaylandHelperClipboard->clip.pfnPopup != NULL)
550553
{
551554
rc = vbcl_wayland_thread_start(&g_hHostInputFocusThread, vbclWaylandHostInputFocusWorker, "wl-focus", (void *)pfShutdown);
552-
VBClLogVerbose(1, "host input focus polling thread started, rc=%Rrc\n", rc);
555+
VBClLogVerbose(1, "host input focus event thread started, rc=%Rrc\n", rc);
553556
}
554557

555558
/* Notify parent thread that we are successfully started. */

0 commit comments

Comments
 (0)