VirtualBox

Ignore:
Timestamp:
Oct 6, 2020 3:11:43 PM (4 years ago)
Author:
vboxsync
Message:

bugref:9637. Dont start screen topology monitoring thread if xrandr is not new enough

File:
1 edited

Legend:

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

    r86078 r86459  
    129129    int hRandRErrorBase;
    130130    int hEventMask;
     131    bool fMonitorInfoAvailable;
    131132    /** The number of outputs (monitors, including disconnect ones) xrandr reports. */
    132133    int hOutputCount;
     
    773774    if (x11Context.pDisplay == NULL)
    774775        return false;
    775     if (RT_FAILURE(startX11MonitorThread()))
    776         return false;
     776    /* don't start the monitoring thread if related randr functionality is not available. */
     777    if (x11Context.fMonitorInfoAvailable)
     778        if (RT_FAILURE(startX11MonitorThread()))
     779            return false;
    777780    return true;
    778781}
     
    834837    *(void **)(&x11Context.pXRRFreeMonitors) = dlsym(x11Context.pRandLibraryHandle, "XRRFreeMonitors");
    835838    checkFunctionPtr(x11Context.pXRRFreeMonitors);
     839
     840    x11Context.fMonitorInfoAvailable = x11Context.pXRRGetMonitors && x11Context.pXRRFreeMonitors;
    836841
    837842    *(void **)(&x11Context.pXRRGetScreenResources) = dlsym(x11Context.pRandLibraryHandle, "XRRGetScreenResources");
     
    897902    x11Context.pXRRAddOutputMode = NULL;
    898903    x11Context.fWmwareCtrlExtention = false;
     904    x11Context.fMonitorInfoAvailable = false;
    899905
    900906    int dummy;
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