Changeset 82664 in vbox for trunk/src/VBox/Additions/x11/VBoxClient
- Timestamp:
- Jan 8, 2020 9:30:36 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display-svga.cpp
r81052 r82664 215 215 if (cDisplaysOut > VMW_MAX_HEADS) 216 216 VBClLogFatalError("Display change request contained, rc=%Rrc\n", rc); 217 for (i = 0, cHeads = 0; i < cDisplaysOut && i < VMW_MAX_HEADS; ++i)217 if (cDisplaysOut > 0) 218 218 { 219 if (!(aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_DISABLED)) 219 cHeads = 0; 220 for (i = 0; i < cDisplaysOut && i < VMW_MAX_HEADS; ++i) 220 221 { 221 if ( (i == 0) || (aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_ORIGIN))222 if (!(aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_DISABLED)) 222 223 { 223 aRects[cHeads].x = aDisplays[i].xOrigin; 224 aRects[cHeads].y = aDisplays[i].yOrigin; 225 } else { 226 aRects[cHeads].x = aRects[cHeads - 1].x + aRects[cHeads - 1].w; 227 aRects[cHeads].y = aRects[cHeads - 1].y; 224 if ((i == 0) || (aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_ORIGIN)) 225 { 226 aRects[cHeads].x = aDisplays[i].xOrigin; 227 aRects[cHeads].y = aDisplays[i].yOrigin; 228 } else { 229 aRects[cHeads].x = aRects[cHeads - 1].x + aRects[cHeads - 1].w; 230 aRects[cHeads].y = aRects[cHeads - 1].y; 231 } 232 aRects[cHeads].w = aDisplays[i].cx; 233 aRects[cHeads].h = aDisplays[i].cy; 234 ++cHeads; 228 235 } 229 aRects[cHeads].w = aDisplays[i].cx;230 aRects[cHeads].h = aDisplays[i].cy;231 ++cHeads;232 236 } 237 for (i = 0; i < cHeads; ++i) 238 printf("Head %u: %dx%d, (%d, %d)\n", i, (int)aRects[i].w, (int)aRects[i].h, 239 (int)aRects[i].x, (int)aRects[i].y); 240 drmSendHints(&drmContext, aRects, cHeads); 233 241 } 234 for (i = 0; i < cHeads; ++i) 235 printf("Head %u: %dx%d, (%d, %d)\n", i, (int)aRects[i].w, (int)aRects[i].h, 236 (int)aRects[i].x, (int)aRects[i].y); 237 drmSendHints(&drmContext, aRects, cHeads); 238 rc = VbglR3WaitEvent(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, RT_INDEFINITE_WAIT, &events); 242 do 243 { 244 rc = VbglR3WaitEvent(VMMDEV_EVENT_DISPLAY_CHANGE_REQUEST, RT_INDEFINITE_WAIT, &events); 245 } while (rc == VERR_INTERRUPTED); 239 246 if (RT_FAILURE(rc)) 240 247 VBClLogFatalError("Failure waiting for event, rc=%Rrc\n", rc);
Note:
See TracChangeset
for help on using the changeset viewer.