Changeset 84156 in vbox for trunk/src/VBox/Additions
- Timestamp:
- May 6, 2020 9:22:11 AM (5 years ago)
- svn:sync-xref-src-repo-rev:
- 137757
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
r84045 r84156 124 124 XRRScreenResources *pScreenResources; 125 125 int hRandRMajor; 126 int hVMWCtrlMajorOpCode;127 126 int hRandRMinor; 128 127 int hRandREventBase; … … 132 131 int hOutputCount; 133 132 void *pRandLibraryHandle; 133 bool fWmwareCtrlExtention; 134 int hVMWCtrlMajorOpCode; 134 135 /** Function pointers we used if we dlopen libXrandr instead of linking. */ 135 136 void (*pXRRSelectInput) (Display *, Window, int); … … 426 427 } 427 428 428 429 /** Makes a call to vmwarectrl extension. This updates the 430 * connection information and possible resolutions (modes) 431 * of each monitor on the driver. Also sets the preferred mode 432 * of each output (monitor) to currently selected one. */ 429 433 bool VMwareCtrlSetTopology(Display *dpy, int hExtensionMajorOpcode, 430 434 int screen, xXineramaScreenInfo extents[], int number) … … 780 784 x11Context.pXRRGetCrtcInfo = NULL; 781 785 x11Context.pXRRAddOutputMode = NULL; 786 x11Context.fWmwareCtrlExtention = false; 782 787 783 788 int dummy; … … 798 803 } 799 804 #endif 800 if (!XQueryExtension(x11Context.pDisplay, "VMWARE_CTRL", 801 &x11Context.hVMWCtrlMajorOpCode, &dummy, &dummy)) 802 { 803 XCloseDisplay(x11Context.pDisplay); 804 XCloseDisplay(x11Context.pDisplayRandRMonitoring); 805 x11Context.pDisplay = NULL; 806 x11Context.pDisplayRandRMonitoring = NULL; 807 return; 808 } 805 806 x11Context.fWmwareCtrlExtention = XQueryExtension(x11Context.pDisplay, "VMWARE_CTRL", 807 &x11Context.hVMWCtrlMajorOpCode, &dummy, &dummy); 808 if (!x11Context.fWmwareCtrlExtention) 809 VBClLogError("VMWARE's ctrl extension is not available!\n"); 810 else 811 { 812 VBClLogInfo("VMWARE's ctrl extension is available. Major Opcode is %d.\n", x11Context.hVMWCtrlMajorOpCode); 813 } 814 815 /* Check Xrandr stuff. */ 809 816 bool fSuccess = false; 810 817 #ifdef WITH_DISTRO_XRAND_XINERAMA … … 1115 1122 { 1116 1123 XGrabServer(x11Context.pDisplay); 1117 callVMWCTRL(paOutputs); 1124 if (x11Context.fWmwareCtrlExtention) 1125 callVMWCTRL(paOutputs); 1118 1126 1119 1127 #ifdef WITH_DISTRO_XRAND_XINERAMA
Note:
See TracChangeset
for help on using the changeset viewer.