Changeset 85962 in vbox
- Timestamp:
- Aug 31, 2020 6:47:22 PM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 140157
- Location:
- trunk/src/VBox/Additions
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/common/VBoxService/VBoxService.cpp
r85121 r85962 78 78 # include <iprt/memtracker.h> 79 79 #endif 80 #include <iprt/env.h> 80 81 #include <iprt/message.h> 81 82 #include <iprt/path.h> … … 91 92 92 93 #include "VBoxServiceInternal.h" 94 #include "VBoxServiceUtils.h" 93 95 #ifdef VBOX_WITH_VBOXSERVICE_CONTROL 94 96 # include "VBoxServiceControl.h" … … 892 894 } 893 895 896 #ifdef RT_OS_LINUX 897 /** 898 * Check for a guest property and start VBoxDRMClient if it exists. 899 * 900 */ 901 static void startDRMResize(void) 902 { 903 uint32_t uGuestPropSvcClientID; 904 int rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID); 905 if (RT_SUCCESS(rc)) 906 { 907 rc = VGSvcCheckPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/DRMResize"); 908 if (RT_SUCCESS(rc)) 909 { 910 RTMsgInfo("Starting DRM resize service"); 911 char szDRMClientPath[RTPATH_MAX]; 912 RTPathExecDir(szDRMClientPath, RTPATH_MAX); 913 RTPathStripSuffix(szDRMClientPath); 914 RTPathAppend(szDRMClientPath, RTPATH_MAX, "VBoxDRMClient"); 915 const char *apszArgs[1] = { NULL }; 916 rc = RTProcCreate("VBoxDRMClient", apszArgs, RTENV_DEFAULT, 917 RTPROC_FLAGS_DETACHED | RTPROC_FLAGS_SEARCH_PATH, NULL); 918 if (rc == -1) 919 RTMsgError("Could not start DRM resize service"); 920 } 921 } 922 } 923 #endif 894 924 895 925 int main(int argc, char **argv) … … 1157 1187 return rcExit; 1158 1188 1189 #ifdef RT_OS_LINUX 1190 startDRMResize(); 1191 #endif 1192 1159 1193 #ifdef RT_OS_WINDOWS 1160 1194 /* … … 1284 1318 return rcExit; 1285 1319 } 1286 -
trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
r84832 r85962 678 678 } 679 679 680 /** 681 * We start VBoxDRMClient from VBoxService in case some guest property is set. 682 * We check the same guest property here and dont start this service in case 683 * it (guest property) is set. 684 */ 685 static bool checkDRMClient() 686 { 687 return false; 688 // uint32_t uGuestPropSvcClientID; 689 // int rc = VbglR3GuestPropConnect(&uGuestPropSvcClientID); 690 // if (RT_SUCCESS(rc)) 691 // { 692 // rc = VGSvcCheckPropExist(uGuestPropSvcClientID, "/VirtualBox/GuestAdd/DRMResize"); 693 // if (RT_SUCCESS(rc)) 694 // return true; 695 // } 696 // return false; 697 } 698 680 699 static bool init() 681 700 { 701 /* If DRM client is already running don't start this service. */ 702 if (checkDRMClient()) 703 return false; 682 704 if (isXwayland()) 683 705 { 684 VBClLogInfo("The parent session seems to be running on Wayland. Starting DRM client\n");685 706 char* argv[] = {NULL}; 686 707 char* env[] = {NULL}; … … 1255 1276 { 1256 1277 RT_NOREF(ppInterface, fDaemonised); 1257 int rc; 1258 uint32_t events; 1278 if (!init()) 1279 return VERR_NOT_AVAILABLE; 1280 1259 1281 /* Do not acknowledge the first event we query for to pick up old events, 1260 1282 * e.g. from before a guest reboot. */ 1261 1283 bool fAck = false; 1262 1284 bool fFirstRun = true; 1263 if (!init())1264 return VERR_NOT_AVAILABLE;1265 1285 static struct VMMDevDisplayDef aMonitors[VMW_MAX_HEADS]; 1266 1286 1267 rc = VbglR3CtlFilterMask(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, 0);1287 int rc = VbglR3CtlFilterMask(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, 0); 1268 1288 if (RT_FAILURE(rc)) 1269 1289 VBClLogFatalError("Failed to request display change events, rc=%Rrc\n", rc); … … 1338 1358 } 1339 1359 } 1360 uint32_t events; 1340 1361 do 1341 1362 {
Note:
See TracChangeset
for help on using the changeset viewer.