Changeset 53313 in vbox for trunk/src/VBox
- Timestamp:
- Nov 12, 2014 1:58:47 PM (10 years ago)
- Location:
- trunk/src/VBox/Additions/WINNT/VBoxTray
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDispIf.cpp
r52143 r53313 53 53 54 54 DWORD EnableAndResizeDispDev(DEVMODE *paDeviceModes, DISPLAY_DEVICE *paDisplayDevices, DWORD totalDispNum, UINT Id, DWORD aWidth, DWORD aHeight, 55 DWORD aBitsPerPixel, DWORD aPosX, DWORDaPosY, BOOL fEnabled, BOOL fExtDispSup);55 DWORD aBitsPerPixel, LONG aPosX, LONG aPosY, BOOL fEnabled, BOOL fExtDispSup); 56 56 57 57 static DWORD vboxDispIfWddmResizeDisplay(PCVBOXDISPIF const pIf, UINT Id, BOOL fEnable, DISPLAY_DEVICE * paDisplayDevices, DEVMODE *paDeviceMode, UINT devModes); … … 320 320 if (pDeviceMode->dmFields & DM_POSITION) 321 321 { 322 LogFlowFunc(("DM_POSITION %d,%d -> %d,%d\n", 323 pCfg->pModeInfoArray[iSrcMode].sourceMode.position.x, 324 pCfg->pModeInfoArray[iSrcMode].sourceMode.position.y, 325 pDeviceMode->dmPosition.x, pDeviceMode->dmPosition.y)); 322 326 pCfg->pModeInfoArray[iSrcMode].sourceMode.position.x = pDeviceMode->dmPosition.x; 323 327 pCfg->pModeInfoArray[iSrcMode].sourceMode.position.y = pDeviceMode->dmPosition.y; … … 1393 1397 DWORD winEr = NO_ERROR; 1394 1398 1395 Log(("VBoxTray: vboxDispIfResizeModesWDDM \n"));1399 Log(("VBoxTray: vboxDispIfResizeModesWDDM iChanged %d cDevModes %d\n", iChangedMode, cDevModes)); 1396 1400 VBoxRrRetryStop(); 1397 1401 -
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp
r51469 r53313 225 225 226 226 DWORD EnableAndResizeDispDev(DEVMODE *paDeviceModes, DISPLAY_DEVICE *paDisplayDevices, DWORD totalDispNum, UINT Id, DWORD aWidth, DWORD aHeight, 227 DWORD aBitsPerPixel, DWORD aPosX, DWORDaPosY, BOOL fEnabled, BOOL fExtDispSup)227 DWORD aBitsPerPixel, LONG aPosX, LONG aPosY, BOOL fEnabled, BOOL fExtDispSup) 228 228 { 229 229 DISPLAY_DEVICE displayDeviceTmp; … … 442 442 /* Returns TRUE to try again. */ 443 443 static BOOL ResizeDisplayDevice(UINT Id, DWORD Width, DWORD Height, DWORD BitsPerPixel, 444 BOOL fEnabled, DWORD dwNewPosX, DWORD dwNewPosY,444 BOOL fEnabled, LONG dwNewPosX, LONG dwNewPosY, bool fChangeOrigin, 445 445 VBOXDISPLAYCONTEXT *pCtx, BOOL fExtDispSup) 446 446 { 447 447 BOOL fDispAlreadyEnabled = false; /* check whether the monitor with ID is already enabled. */ 448 448 BOOL fModeReset = (Width == 0 && Height == 0 && BitsPerPixel == 0 && 449 dwNewPosX == 0 && dwNewPosY == 0 );449 dwNewPosX == 0 && dwNewPosY == 0 && !fChangeOrigin); 450 450 DWORD dmFields = 0; 451 451 452 LogFlowFunc(("ResizeDisplayDevice Width= %d, Height=%d , PosX=%d and PosY=%d \ 453 fEnabled = %d, fExtDisSup = %d\n", 454 Width, Height, dwNewPosX, dwNewPosY, fEnabled, fExtDispSup)); 452 LogFlowFunc(("[%d] %dx%d at %d,%d fChangeOrigin %d fEnabled %d fExtDisSup %d\n", 453 Id, Width, Height, dwNewPosX, dwNewPosY, fChangeOrigin, fEnabled, fExtDispSup)); 455 454 456 455 if (!gCtx.fAnyX) … … 491 490 { 492 491 LogRel(("Extended Display Support.\n")); 493 LogFlowFunc(("ResizeDisplayDevice1: %dx%dx%d at %d,%d . Id = %d and DevNum=%d, fEnabled=%d\n", 494 paDeviceModes[Id].dmPelsWidth, 495 paDeviceModes[Id].dmPelsHeight, 496 paDeviceModes[Id].dmBitsPerPel, 497 paDeviceModes[Id].dmPosition.x, 498 paDeviceModes[Id].dmPosition.y, 499 Id, DevNum, fEnabled)); 492 LogFlowFunc(("[%d] %dx%dx%d at %d,%d, dmFields 0x%x\n", 493 i, 494 paDeviceModes[i].dmPelsWidth, 495 paDeviceModes[i].dmPelsHeight, 496 paDeviceModes[i].dmBitsPerPel, 497 paDeviceModes[i].dmPosition.x, 498 paDeviceModes[i].dmPosition.y, 499 paDeviceModes[i].dmFields)); 500 500 } 501 501 else … … 537 537 dmFields |= DM_BITSPERPEL; 538 538 539 if (! dwNewPosX && !dwNewPosY)540 { 541 /* @fixme: zero position is a valid state, so another values should be used as a special case !!!*/539 if (!fChangeOrigin) 540 { 541 /* Use existing position. */ 542 542 dwNewPosX = paRects[Id].left; 543 543 dwNewPosY = paRects[Id].top; 544 } 545 else 546 dmFields |= DM_POSITION; 544 LogFlowFunc(("existing dwNewPosX %d, dwNewPosY %d\n", dwNewPosX, dwNewPosY)); 545 } 546 547 /* Always update the position. 548 * It is either explicitly requested or must be set to the existing position. 549 */ 550 dmFields |= DM_POSITION; 547 551 548 552 /* Check whether a mode reset or a change is requested. … … 612 616 } 613 617 614 LogFlowFunc(("ResizeDisplayDevice: pfnChangeDisplaySettingsEx %x: %dx%dx%d at %d,%d \n",618 LogFlowFunc(("ResizeDisplayDevice: pfnChangeDisplaySettingsEx %x: %dx%dx%d at %d,%d fields 0x%X\n", 615 619 gCtx.pfnChangeDisplaySettingsEx, 616 620 paDeviceModes[i].dmPelsWidth, … … 618 622 paDeviceModes[i].dmBitsPerPel, 619 623 paDeviceModes[i].dmPosition.x, 620 paDeviceModes[i].dmPosition.y)); 624 paDeviceModes[i].dmPosition.y, 625 paDeviceModes[i].dmFields)); 621 626 } 622 627 … … 849 854 displayChangeRequest.cxOrigin, 850 855 displayChangeRequest.cyOrigin, 856 displayChangeRequest.fChangeOrigin, 851 857 pCtx, 852 858 fExtDispSup
Note:
See TracChangeset
for help on using the changeset viewer.