Changeset 94978 in vbox for trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
- Timestamp:
- May 10, 2022 9:46:23 AM (3 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
r94903 r94978 187 187 void (*pXRRFreeCrtcInfo)(XRRCrtcInfo *); 188 188 void (*pXRRAddOutputMode)(Display *, RROutput, RRMode); 189 void (*pXRRDeleteOutputMode)(Display *, RROutput, RRMode); 190 void (*pXRRDestroyMode)(Display *, RRMode); 189 191 void (*pXRRSetOutputPrimary)(Display *, Window, RROutput); 190 192 }; … … 956 958 *(void **)(&x11Context.pXRRAddOutputMode) = dlsym(x11Context.pRandLibraryHandle, "XRRAddOutputMode"); 957 959 checkFunctionPtr(x11Context.pXRRAddOutputMode); 960 961 *(void **)(&x11Context.pXRRDeleteOutputMode) = dlsym(x11Context.pRandLibraryHandle, "XRRDeleteOutputMode"); 962 checkFunctionPtr(x11Context.pXRRDeleteOutputMode); 963 964 *(void **)(&x11Context.pXRRDestroyMode) = dlsym(x11Context.pRandLibraryHandle, "XRRDestroyMode"); 965 checkFunctionPtr(x11Context.pXRRDestroyMode); 958 966 959 967 *(void **)(&x11Context.pXRRSetOutputPrimary) = dlsym(x11Context.pRandLibraryHandle, "XRRSetOutputPrimary"); … … 986 994 x11Context.pXRRFreeCrtcInfo = NULL; 987 995 x11Context.pXRRAddOutputMode = NULL; 996 x11Context.pXRRDeleteOutputMode = NULL; 997 x11Context.pXRRDestroyMode = NULL; 988 998 x11Context.pXRRSetOutputPrimary = NULL; 989 999 x11Context.fWmwareCtrlExtention = false; … … 1274 1284 return false; 1275 1285 } 1286 1287 AssertReturn(iOutputIndex >= 0, false); 1288 AssertReturn(iOutputIndex < VMW_MAX_HEADS, false); 1289 1290 /* Remember the last instantiated display mode ID here. This mode will be replaced with the 1291 * new one on the next guest screen resize event. */ 1292 static RRMode aPrevMode[VMW_MAX_HEADS]; 1293 1276 1294 RROutput outputId = x11Context.pScreenResources->outputs[iOutputIndex]; 1277 1295 XRROutputInfo *pOutputInfo = NULL; … … 1309 1327 x11Context.pXRRAddOutputMode(x11Context.pDisplay, outputId, pModeInfo->id); 1310 1328 #endif 1329 1330 /* Destroy and forget mode created on previous guest screen resize event. */ 1331 if ( aPrevMode[outputId] > 0 1332 && pModeInfo->id != aPrevMode[outputId]) 1333 { 1334 VBClLogInfo("removing unused mode %u\n", aPrevMode[outputId]); 1335 #ifdef WITH_DISTRO_XRAND_XINERAMA 1336 XRRDeleteOutputMode(x11Context.pDisplay, outputId, aPrevMode[outputId]); 1337 XRRDestroyMode(x11Context.pDisplay, aPrevMode[outputId]); 1338 #else 1339 if (x11Context.pXRRDeleteOutputMode) 1340 x11Context.pXRRDeleteOutputMode(x11Context.pDisplay, outputId, aPrevMode[outputId]); 1341 if (x11Context.pXRRDestroyMode) 1342 x11Context.pXRRDestroyMode(x11Context.pDisplay, aPrevMode[outputId]); 1343 #endif 1344 } 1345 1346 aPrevMode[outputId] = pModeInfo->id; 1311 1347 1312 1348 if (paOutputs[iOutputIndex].fPrimary)
Note:
See TracChangeset
for help on using the changeset viewer.