Changeset 96876 in vbox for trunk/src/VBox/Additions/x11
- Timestamp:
- Sep 26, 2022 4:11:19 PM (2 years ago)
- svn:sync-xref-src-repo-rev:
- 153783
- Location:
- trunk/src/VBox/Additions/x11/VBoxClient
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
r96875 r96876 776 776 777 777 /** 778 * Tries to determine if the session parenting this process is of Xwayland.779 * NB: XDG_SESSION_TYPE is a systemd(1) environment variable and is unlikely780 * set in non-systemd environments or remote logins.781 * Therefore we check the Wayland specific display environment variable first.782 */783 static bool isXwayland(void)784 {785 const char *const pDisplayType = RTEnvGet(VBCL_ENV_WAYLAND_DISPLAY);786 const char *pSessionType;787 788 if (pDisplayType != NULL)789 return true;790 791 pSessionType = RTEnvGet(VBCL_ENV_XDG_SESSION_TYPE);792 if ((pSessionType != NULL) && (RTStrIStartsWith(pSessionType, "wayland")))793 return true;794 795 return false;796 }797 798 /**799 778 * @interface_method_impl{VBCLSERVICE,pfnInit} 800 779 */ … … 819 798 } 820 799 821 if ( isXwayland())800 if (VBClHasWayland()) 822 801 { 823 802 rc = VbglR3DrmClientStart(); -
trunk/src/VBox/Additions/x11/VBoxClient/main.cpp
r96407 r96876 119 119 static char g_szLogFile[RTPATH_MAX + 128] = ""; 120 120 121 /** 122 * Tries to determine if the session parenting this process is of Xwayland. 123 * NB: XDG_SESSION_TYPE is a systemd(1) environment variable and is unlikely 124 * set in non-systemd environments or remote logins. 125 * Therefore we check the Wayland specific display environment variable first. 126 */ 121 127 bool VBClHasWayland(void) 122 128 { 123 return RTEnvGet(VBCL_ENV_WAYLAND_DISPLAY) != NULL; 129 const char *const pDisplayType = RTEnvGet(VBCL_ENV_WAYLAND_DISPLAY); 130 const char *pSessionType; 131 132 if (pDisplayType != NULL) 133 return true; 134 135 pSessionType = RTEnvGet(VBCL_ENV_XDG_SESSION_TYPE); 136 if ((pSessionType != NULL) && (RTStrIStartsWith(pSessionType, "wayland"))) 137 return true; 138 139 return false; 124 140 } 125 141
Note:
See TracChangeset
for help on using the changeset viewer.