Changeset 83242 in vbox
- Timestamp:
- Mar 10, 2020 11:12:02 AM (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp
r83236 r83242 217 217 return; 218 218 } 219 VbglR3SeamlessSendMonitorPositions(cPositions, pPositions); 219 int rc = VbglR3SeamlessSendMonitorPositions(cPositions, pPositions); 220 if (RT_SUCCESS(rc)) 221 VBClLogError("Sending monitor positions (%u of them) to the host: %Rrc\n", cPositions, rc); 222 else 223 VBClLogError("Error during sending monitor positions (%u of them) to the host: %Rrc\n", cPositions, rc); 220 224 } 221 225 … … 239 243 #else 240 244 if (x11Context.pXRRGetMonitors) 241 x11Context.pXRRGetMonitors(x11Context.pDisplay, DefaultRootWindow(x11Context.pDisplay), true, &iMonitorCount);245 pMonitorInfo = x11Context.pXRRGetMonitors(x11Context.pDisplay, DefaultRootWindow(x11Context.pDisplay), true, &iMonitorCount); 242 246 #endif 243 247 if (!pMonitorInfo) … … 376 380 return false; 377 381 callVMWCTRL(); 378 #ifdef WITH_DISTRO_XRAND_XINERAMA379 XRRSelectInput(x11Context.pDisplay, x11Context.rootWindow, x11Context.hEventMask);380 #else381 if (x11Context.pXRRSelectInput)382 x11Context.pXRRSelectInput(x11Context.pDisplay, x11Context.rootWindow, x11Context.hEventMask);383 #endif384 382 if (RT_FAILURE(startX11MonitorThread())) 385 383 return false; … … 441 439 static void x11Connect() 442 440 { 441 x11Context.pXRRSelectInput = NULL; 442 x11Context.pRandLibraryHandle = NULL; 443 x11Context.pXRRQueryExtension = NULL; 444 x11Context.pXRRQueryVersion = NULL; 445 x11Context.pXRRGetMonitors = NULL; 446 x11Context.pXRRFreeMonitors = NULL; 447 443 448 int dummy; 444 449 if (x11Context.pDisplay != NULL) … … 447 452 if (x11Context.pDisplay == NULL) 448 453 return; 454 #ifndef WITH_DISTRO_XRAND_XINERAMA 455 if (openLibRandR() != VINF_SUCCESS) 456 { 457 XCloseDisplay(x11Context.pDisplay); 458 x11Context.pDisplay = NULL; 459 return; 460 } 461 #endif 462 449 463 if (!XQueryExtension(x11Context.pDisplay, "VMWARE_CTRL", 450 464 &x11Context.hVMWCtrlMajorOpCode, &dummy, &dummy)) … … 477 491 } 478 492 } 479 x11Context.hEventMask = 0; 493 x11Context.rootWindow = DefaultRootWindow(x11Context.pDisplay); 494 x11Context.hOutputCount = determineOutputCount(); 495 480 496 x11Context.hEventMask = RRScreenChangeNotifyMask; 481 497 if (x11Context.hRandRMinor >= 2) … … 483 499 | RROutputChangeNotifyMask 484 500 | RROutputPropertyNotifyMask; 485 x11Context.rootWindow = DefaultRootWindow(x11Context.pDisplay); 486 x11Context.hOutputCount = determineOutputCount(); 487 x11Context.pXRRSelectInput = NULL; 488 x11Context.pRandLibraryHandle = NULL; 489 x11Context.pXRRQueryExtension = NULL; 490 x11Context.pXRRQueryVersion = NULL; 491 x11Context.pXRRGetMonitors = NULL; 492 x11Context.pXRRFreeMonitors = NULL; 493 #ifndef WITH_DISTRO_XRAND_XINERAMA 494 if (openLibRandR() != VINF_SUCCESS) 495 { 496 XCloseDisplay(x11Context.pDisplay); 497 x11Context.pDisplay = NULL; 498 return; 499 } 501 502 /* Select the XEvent types we want to listen to. */ 503 #ifdef WITH_DISTRO_XRAND_XINERAMA 504 XRRSelectInput(x11Context.pDisplay, x11Context.rootWindow, x11Context.hEventMask); 505 #else 506 if (x11Context.pXRRSelectInput) 507 x11Context.pXRRSelectInput(x11Context.pDisplay, x11Context.rootWindow, x11Context.hEventMask); 500 508 #endif 501 509 }
Note:
See TracChangeset
for help on using the changeset viewer.