VirtualBox

Changeset 83242 in vbox


Ignore:
Timestamp:
Mar 10, 2020 11:12:02 AM (5 years ago)
Author:
vboxsync
Message:

bugref:9637. More fixes

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Additions/x11/VBoxClient/display-svga-x11.cpp

    r83236 r83242  
    217217        return;
    218218    }
    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);
    220224}
    221225
     
    239243#else
    240244    if (x11Context.pXRRGetMonitors)
    241         x11Context.pXRRGetMonitors(x11Context.pDisplay, DefaultRootWindow(x11Context.pDisplay), true, &iMonitorCount);
     245        pMonitorInfo = x11Context.pXRRGetMonitors(x11Context.pDisplay, DefaultRootWindow(x11Context.pDisplay), true, &iMonitorCount);
    242246#endif
    243247    if (!pMonitorInfo)
     
    376380        return false;
    377381    callVMWCTRL();
    378 #ifdef WITH_DISTRO_XRAND_XINERAMA
    379     XRRSelectInput(x11Context.pDisplay, x11Context.rootWindow, x11Context.hEventMask);
    380 #else
    381     if (x11Context.pXRRSelectInput)
    382         x11Context.pXRRSelectInput(x11Context.pDisplay, x11Context.rootWindow, x11Context.hEventMask);
    383 #endif
    384382    if (RT_FAILURE(startX11MonitorThread()))
    385383        return false;
     
    441439static void x11Connect()
    442440{
     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
    443448    int dummy;
    444449    if (x11Context.pDisplay != NULL)
     
    447452    if (x11Context.pDisplay == NULL)
    448453        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
    449463    if (!XQueryExtension(x11Context.pDisplay, "VMWARE_CTRL",
    450464                         &x11Context.hVMWCtrlMajorOpCode, &dummy, &dummy))
     
    477491        }
    478492    }
    479     x11Context.hEventMask = 0;
     493    x11Context.rootWindow = DefaultRootWindow(x11Context.pDisplay);
     494    x11Context.hOutputCount = determineOutputCount();
     495
    480496    x11Context.hEventMask = RRScreenChangeNotifyMask;
    481497    if (x11Context.hRandRMinor >= 2)
     
    483499                               | RROutputChangeNotifyMask
    484500                               | 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);
    500508#endif
    501509}
Note: See TracChangeset for help on using the changeset viewer.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette