Changeset 93551 in vbox for trunk/src/VBox/Additions/x11
- Timestamp:
- Feb 2, 2022 6:58:31 PM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 149681
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/VBoxClient.h
r93385 r93551 27 27 #include <iprt/string.h> 28 28 29 /** Environment variable which is exported when in Wayland Desktop Environment. */ 30 #define VBCL_ENV_WAYLAND_DISPLAY "WAYLAND_DISPLAY" 31 29 32 void VBClLogInfo(const char *pszFormat, ...); 30 33 void VBClLogError(const char *pszFormat, ...); … … 35 38 void VBClLogSetLogPrefix(const char *pszPrefix); 36 39 void VBClLogDestroy(void); 40 41 /** 42 * Detect if user is running on Wayland by checking corresponding environment variable. 43 * 44 * @returns True if Wayland has been detected, False otherwise. 45 */ 46 extern bool VBClHasWayland(void); 37 47 38 48 /** Call clean-up for the current service and exit. */ -
trunk/src/VBox/Additions/x11/VBoxClient/display-helper-gnome3.cpp
r93423 r93551 926 926 927 927 /** 928 * Detect if user is running on Wayland by checking corresponding environment variable.929 *930 * @returns True if Wayland has been detected, False otherwise.931 */932 static bool vbcl_hlp_gnome3_has_wayland(void)933 {934 return RTEnvGet(VBCL_HLP_ENV_WAYLAND_DISPLAY) != NULL;935 }936 937 /**938 928 * @interface_method_impl{VBCLDISPLAYHELPER,pfnInit} 939 929 */ … … 942 932 int rc; 943 933 944 if (! vbcl_hlp_gnome3_has_wayland())934 if (!VBClHasWayland()) 945 935 { 946 936 rc = vbcl_hlp_generic_init(); … … 958 948 int rc; 959 949 960 if (! vbcl_hlp_gnome3_has_wayland())950 if (!VBClHasWayland()) 961 951 { 962 952 rc = vbcl_hlp_generic_term(); -
trunk/src/VBox/Additions/x11/VBoxClient/display-helper.h
r93423 r93551 26 26 /** Environment variable which contains information about currently running Desktop Environment. */ 27 27 #define VBCL_HLP_ENV_XDG_CURRENT_DESKTOP "XDG_CURRENT_DESKTOP" 28 /** Environment variable which is exported when in Wayland Desktop Environment. */29 #define VBCL_HLP_ENV_WAYLAND_DISPLAY "WAYLAND_DISPLAY"30 28 31 29 /** -
trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
r93385 r93551 34 34 #include <iprt/path.h> 35 35 #include <iprt/stream.h> 36 #include <iprt/env.h> 36 37 #include <VBox/VBoxGuestLib.h> 37 38 #include <VBox/err.h> … … 107 108 static char g_szLogFile[RTPATH_MAX + 128] = ""; 108 109 110 bool VBClHasWayland(void) 111 { 112 return RTEnvGet(VBCL_ENV_WAYLAND_DISPLAY) != NULL; 113 } 114 109 115 /** 110 116 * Shut down if we get a signal or something.
Note:
See TracChangeset
for help on using the changeset viewer.