Skip to content

Commit ca3bede

Browse files
committed
VBoxClient,GuestHost: Implemented the wayland support in the --clipboard service using the guest/host bits, refactoring the gtk subprocess handling a bit. The --wayland service remains the same. [build & doxygen fixes] bugref:10194
svn:sync-xref-src-repo-rev: r174577
1 parent fefabdd commit ca3bede

2 files changed

Lines changed: 27 additions & 3 deletions

File tree

src/VBox/Additions/x11/VBoxClient/VBoxClient.h

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: VBoxClient.h 114738 2026-07-21 13:40:26Z knut.osmundsen@oracle.com $ */
1+
/* $Id: VBoxClient.h 114740 2026-07-21 14:36:59Z knut.osmundsen@oracle.com $ */
22
/** @file
33
*
44
* VirtualBox additions user session daemon.
@@ -79,16 +79,33 @@ typedef struct VBCLHOSTINPUTFOCUSSTATE
7979
{
8080
/** @name User Settable Properties.
8181
* @{ */
82+
/**
83+
* Called when the host VM process receives input focus.
84+
*
85+
* @return Quit indicator - true to quit, false to keep going.
86+
* @param pThis Pointer to this structure.
87+
*/
8288
DECLCALLBACKMEMBER(bool, pfnFocusEnter,(struct VBCLHOSTINPUTFOCUSSTATE *pThis));
89+
/**
90+
* Called when the host VM process loses input focus.
91+
*
92+
* @return Quit indicator - true to quit, false to keep going.
93+
* @param pThis Pointer to this structure.
94+
*/
8395
DECLCALLBACKMEMBER(bool, pfnFocusExit,(struct VBCLHOSTINPUTFOCUSSTATE *pThis));
96+
/** Pointer to the shutdown indicator (will be set to fShutdownInternal if NULL). */
8497
bool volatile *pfShutdown;
98+
/** Where to store user data. */
8599
void *pvUser;
86100
/** @} */
87101

88102
/** @name Internal
89103
* @{ */
104+
/** Handle of the monitoring thread (don't touch). */
90105
RTTHREAD hThread;
106+
/** Guest property client handle (don't touch). */
91107
VBGLGSTPROPCLIENT GuestPropClient;
108+
/** Internal shutdown indicator (don't touch). */
92109
bool volatile fShutdownInternal;
93110
/** @} */
94111
} VBCLHOSTINPUTFOCUSSTATE;

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

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* $Id: main.cpp 114738 2026-07-21 13:40:26Z knut.osmundsen@oracle.com $ */
1+
/* $Id: main.cpp 114740 2026-07-21 14:36:59Z knut.osmundsen@oracle.com $ */
22
/** @file
33
* VirtualBox Guest Additions - X11 Client.
44
*/
@@ -52,7 +52,9 @@
5252
#include <VBox/version.h>
5353

5454
#include "VBoxClient.h"
55-
#include "clipboard.h"
55+
#ifdef VBOX_WITH_SHARED_CLIPBOARD
56+
# include "clipboard.h"
57+
#endif
5658

5759

5860
/*********************************************************************************************************************************
@@ -424,6 +426,7 @@ static VBCLCOMMAND const g_CmdSessionDetect =
424426
/* .pfnExecute = */ vbclCmdSessionDetect,
425427
};
426428

429+
#ifdef VBOX_WITH_SHARED_CLIPBOARD
427430

428431
/**
429432
* --session-detect2
@@ -450,6 +453,8 @@ static VBCLCOMMAND const g_CmdSessionDetect2 =
450453
/* .pfnExecute = */ vbclCmdSessionDetect2,
451454
};
452455

456+
#endif /* VBOX_WITH_SHARED_CLIPBOARD */
457+
453458

454459
/**
455460
* Print out a usage message and exit with success.
@@ -867,7 +872,9 @@ int main(int argc, char *argv[])
867872
g_Service.pCommand = &(a_Command); \
868873
break
869874
VBOXCLIENT_OPT_CASE_COMMAND(VBOXCLIENT_OPT_SESSION_DETECT, g_CmdSessionDetect);
875+
#ifdef VBOX_WITH_SHARED_CLIPBOARD
870876
VBOXCLIENT_OPT_CASE_COMMAND(VBOXCLIENT_OPT_SESSION_DETECT2, g_CmdSessionDetect2);
877+
#endif
871878
#ifdef VBOX_WITH_WAYLAND_ADDITIONS
872879
VBOXCLIENT_OPT_CASE_COMMAND(VBOXCLIENT_OPT_CLIPBOARD_GET, g_CmdClipboardGet);
873880
VBOXCLIENT_OPT_CASE_COMMAND(VBOXCLIENT_OPT_CLIPBOARD_SET, g_CmdClipboardSet);

0 commit comments

Comments
 (0)