Changeset 36016 in vbox
- Timestamp:
- Feb 17, 2011 3:28:12 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/vboxvideo/vboxvideo.c
r35949 r36016 1277 1277 { 1278 1278 VBOXPtr pVBox = VBOXGetRec(pScrn); 1279 Bool rc = TRUE, fActive = !pVBox->afDisabled[cDisplay];1280 1279 uint32_t offStart, cwReal = cWidth; 1281 1280 … … 1292 1291 if ( offStart + pVBox->cbLine * cHeight > pVBox->cbFBMax 1293 1292 || pVBox->cbLine * pScrn->virtualY > pVBox->cbFBMax) 1294 fActive =FALSE;1293 return FALSE; 1295 1294 /* Deactivate the screen if it is outside of the virtual framebuffer and 1296 1295 * clamp it to lie inside if it is partly outside. */ 1297 1296 if (x >= pScrn->displayWidth || x + (int) cWidth <= 0) 1298 fActive =FALSE;1297 return FALSE; 1299 1298 else 1300 1299 cwReal = RT_MIN((int) cWidth, pScrn->displayWidth - x); 1301 TRACE_LOG("pVBox->afDisabled[cDisplay]=%d , fActive=%d\n",1302 (int)pVBox->afDisabled[cDisplay] , (int)fActive);1300 TRACE_LOG("pVBox->afDisabled[cDisplay]=%d\n", 1301 (int)pVBox->afDisabled[cDisplay]); 1303 1302 /* Don't fiddle with the hardware if we are switched 1304 1303 * to a virtual terminal. */ 1305 if (!pVBox->vtSwitch && fActive) 1304 if (pVBox->vtSwitch) 1305 return TRUE; 1306 if (cDisplay == 0) 1307 VBoxVideoSetModeRegisters(cwReal, cHeight, pScrn->displayWidth, 1308 vboxBPP(pScrn), 0, x, y); 1309 /* Tell the host we support graphics */ 1310 if (vbox_device_available(pVBox)) 1311 vboxEnableGraphicsCap(pVBox); 1312 if (pVBox->fHaveHGSMI) 1306 1313 { 1307 if (cDisplay == 0) 1308 VBoxVideoSetModeRegisters(cwReal, cHeight, pScrn->displayWidth, 1309 vboxBPP(pScrn), 0, x, y); 1310 /* Tell the host we support graphics */ 1311 if (vbox_device_available(pVBox)) 1312 vboxEnableGraphicsCap(pVBox); 1313 } 1314 if ( (pVBox->fHaveHGSMI) 1315 && !pVBox->vtSwitch) 1314 uint16_t fFlags = VBVA_SCREEN_F_ACTIVE; 1315 fFlags |= (pVBox->afDisabled[cDisplay] ? VBVA_SCREEN_F_DISABLED : 0); 1316 1316 VBoxHGSMIProcessDisplayInfo(&pVBox->guestCtx, cDisplay, x, y, 1317 1317 offStart, pVBox->cbLine, cwReal, cHeight, 1318 vboxBPP(pScrn), 1319 VBVA_SCREEN_F_ACTIVE 1320 | (fActive ? 0: VBVA_SCREEN_F_DISABLED)); 1321 TRACE_LOG("returning %s\n", rc ? "TRUE" : "FALSE"); 1322 return rc; 1318 vboxBPP(pScrn), fFlags); 1319 } 1320 return TRUE; 1323 1321 } 1324 1322
Note:
See TracChangeset
for help on using the changeset viewer.

