Changeset 91716 in vbox
- Timestamp:
- Oct 13, 2021 1:42:01 PM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
r91670 r91716 160 160 void (*pXRRFreeCrtcInfo)(XRRCrtcInfo *); 161 161 void (*pXRRAddOutputMode)(Display *, RROutput, RRMode); 162 void (*pXRRSetOutputPrimary)(Display *, Window, RROutput); 162 163 }; 163 164 … … 171 172 uint32_t height; 172 173 bool fEnabled; 174 bool fPrimary; 173 175 }; 174 176 … … 886 888 *(void **)(&x11Context.pXRRAddOutputMode) = dlsym(x11Context.pRandLibraryHandle, "XRRAddOutputMode"); 887 889 checkFunctionPtrReturn(x11Context.pXRRAddOutputMode); 890 891 *(void **)(&x11Context.pXRRSetOutputPrimary) = dlsym(x11Context.pRandLibraryHandle, "XRRSetOutputPrimary"); 892 checkFunctionPtrReturn(x11Context.pXRRSetOutputPrimary); 888 893 889 894 return VINF_SUCCESS; … … 913 918 x11Context.pXRRFreeCrtcInfo = NULL; 914 919 x11Context.pXRRAddOutputMode = NULL; 920 x11Context.pXRRSetOutputPrimary = NULL; 915 921 x11Context.fWmwareCtrlExtention = false; 916 922 x11Context.fMonitorInfoAvailable = false; … … 1226 1232 x11Context.pXRRAddOutputMode(x11Context.pDisplay, outputId, pModeInfo->id); 1227 1233 #endif 1234 1235 if (paOutputs[iOutputIndex].fPrimary) 1236 { 1237 #ifdef WITH_DISTRO_XRAND_XINERAMA 1238 XRRSetOutputPrimary(x11Context.pDisplay, x11Context.rootWindow, outputId); 1239 #else 1240 if (x11Context.pXRRSetOutputPrimary) 1241 x11Context.pXRRSetOutputPrimary(x11Context.pDisplay, x11Context.rootWindow, outputId); 1242 #endif 1243 } 1244 1228 1245 /* Make sure outputs crtc is set. */ 1229 1246 pOutputInfo->crtc = pOutputInfo->crtcs[0]; … … 1422 1439 /* Create a whole topology and send it to xrandr. */ 1423 1440 struct RANDROUTPUT aOutputs[VMW_MAX_HEADS]; 1424 int iRunningX = 0;1425 1441 for (int j = 0; j < x11Context.hOutputCount; ++j) 1426 1442 { 1427 aOutputs[j].x = iRunningX;1443 aOutputs[j].x = aMonitors[j].xOrigin; 1428 1444 aOutputs[j].y = aMonitors[j].yOrigin; 1429 1445 aOutputs[j].width = aMonitors[j].cx; 1430 1446 aOutputs[j].height = aMonitors[j].cy; 1431 1447 aOutputs[j].fEnabled = !(aMonitors[j].fDisplayFlags & VMMDEV_DISPLAY_DISABLED); 1432 if (aOutputs[j].fEnabled) 1433 iRunningX += aOutputs[j].width; 1448 aOutputs[j].fPrimary = (aMonitors[j].fDisplayFlags & VMMDEV_DISPLAY_PRIMARY); 1434 1449 } 1435 1450 /* In 32-bit guests GAs build on our release machines causes an xserver lock during vmware_ctrl extention
Note:
See TracChangeset
for help on using the changeset viewer.