Changeset 72352 in vbox for trunk/src/VBox/Additions/WINNT/VBoxTray
- Timestamp:
- May 26, 2018 12:37:50 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/WINNT/VBoxTray/VBoxDisplay.cpp
r69500 r72352 769 769 } 770 770 771 static void doResize(PVBOXDISPLAYCONTEXT pCtx, 772 uint32_t iDisplay, 773 uint32_t cx, 774 uint32_t cy, 775 uint32_t cBits, 776 bool fEnabled, 777 uint32_t cxOrigin, 778 uint32_t cyOrigin, 779 bool fChangeOrigin) 780 { 781 for (;;) 782 { 783 VBOXDISPLAY_DRIVER_TYPE enmDriverType = getVBoxDisplayDriverType(pCtx); 784 if (enmDriverType == VBOXDISPLAY_DRIVER_TYPE_UNKNOWN) 785 { 786 LogFlowFunc(("vboxDisplayDriver is not active\n")); 787 break; 788 } 789 790 if (pCtx->pfnChangeDisplaySettingsEx != 0) 791 { 792 LogFlowFunc(("Detected W2K or later\n")); 793 if (!ResizeDisplayDevice(pCtx, 794 iDisplay, 795 cx, 796 cy, 797 cBits, 798 fEnabled, 799 cxOrigin, 800 cyOrigin, 801 fChangeOrigin, 802 true /*fExtDispSup*/ )) 803 { 804 LogFlowFunc(("ResizeDipspalyDevice return 0\n")); 805 break; 806 } 807 808 } 809 else 810 { 811 LogFlowFunc(("Detected NT\n")); 812 ResizeDisplayDeviceNT4(cx, cy, cBits); 813 break; 814 } 815 816 /* Retry the change a bit later. */ 817 RTThreadSleep(1000); 818 } 819 } 820 771 821 /** 772 822 * Thread function to wait for and process display change requests. … … 821 871 { 822 872 LogFlowFunc(("going to get display change information\n")); 873 874 #if 0 875 /* Prototype code which processes the multimonitor resize request. */ 876 VMMDevDisplayDef aDisplays[64]; 877 uint32_t cDisplays = VBoxDisplayGetCount(); 878 rc = VbglR3GetDisplayChangeRequestMulti(cDisplays, &cDisplays, &aDisplays[0], true /* fAck */); 879 if (RT_SUCCESS(rc)) 880 { 881 LogRel(("Got multi resize request %d displays\n", cDisplays)); 882 883 uint32_t i; 884 for (i = 0; i < cDisplays; ++i) 885 { 886 LogRel(("[%d]: %d 0x%02X %d,%d %dx%d %d\n", 887 i, aDisplays[i].idDisplay, 888 aDisplays[i].fDisplayFlags, 889 aDisplays[i].xOrigin, 890 aDisplays[i].yOrigin, 891 aDisplays[i].cx, 892 aDisplays[i].cy, 893 aDisplays[i].cBitsPerPixel)); 894 895 doResize(pCtx, 896 aDisplays[i].idDisplay, 897 (aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_CX) ? aDisplays[i].cx : 0, 898 (aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_CY) ? aDisplays[i].cy : 0, 899 (aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_BPP) ? aDisplays[i].cBitsPerPixel : 0, 900 !RT_BOOL(aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_DISABLED), 901 aDisplays[i].xOrigin, 902 aDisplays[i].yOrigin, 903 RT_BOOL(aDisplays[i].fDisplayFlags & VMMDEV_DISPLAY_ORIGIN)); 904 } 905 906 continue; /* Done */ 907 } 908 /* Fall back to the single monitor resize request. */ 909 #endif 823 910 824 911 /* … … 850 937 iDisplay, cx, cy, cBits, fEnabled, cxOrigin, cyOrigin, fChangeOrigin)); 851 938 852 for (;;) 853 { 854 VBOXDISPLAY_DRIVER_TYPE enmDriverType = getVBoxDisplayDriverType(pCtx); 855 if (enmDriverType == VBOXDISPLAY_DRIVER_TYPE_UNKNOWN) 856 { 857 LogFlowFunc(("vboxDisplayDriver is not active\n")); 858 break; 859 } 860 861 if (pCtx->pfnChangeDisplaySettingsEx != 0) 862 { 863 LogFlowFunc(("Detected W2K or later\n")); 864 if (!ResizeDisplayDevice(pCtx, 865 iDisplay, 866 cx, 867 cy, 868 cBits, 869 fEnabled, 870 cxOrigin, 871 cyOrigin, 872 fChangeOrigin, 873 true /*fExtDispSup*/ )) 874 { 875 LogFlowFunc(("ResizeDipspalyDevice return 0\n")); 876 break; 877 } 878 879 } 880 else 881 { 882 LogFlowFunc(("Detected NT\n")); 883 ResizeDisplayDeviceNT4(cx, cy, cBits); 884 break; 885 } 886 887 /* Retry the change a bit later. */ 888 RTThreadSleep(1000); 889 } 939 doResize(pCtx, 940 iDisplay, 941 cx, 942 cy, 943 cBits, 944 fEnabled, 945 cxOrigin, 946 cyOrigin, 947 fChangeOrigin); 890 948 } 891 949 } // if (fDisplayChangeQueried)
Note:
See TracChangeset
for help on using the changeset viewer.