VirtualBox

Changeset 84831 in vbox for trunk/src/VBox/Additions


Ignore:
Timestamp:
Jun 15, 2020 12:28:46 PM (5 years ago)
Author:
vboxsync
Message:

bugref:9637. don't make vmware_ctrl extention call at each resize iteration in 32-bit but rather only once during initilization. it causes a hang in xserver.

File:
1 edited

Legend:

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

    r84661 r84831  
    436436                            int screen, xXineramaScreenInfo extents[], int number)
    437437{
    438    xVMwareCtrlSetTopologyReply rep;
    439    xVMwareCtrlSetTopologyReq *req;
    440 
    441    long len;
    442 
    443    LockDisplay(dpy);
    444 
    445    GetReq(VMwareCtrlSetTopology, req);
    446    req->reqType = hExtensionMajorOpcode;
    447    req->VMwareCtrlReqType = X_VMwareCtrlSetTopology;
    448    req->screen = screen;
    449    req->number = number;
    450 
    451    len = ((long) number) << 1;
    452    SetReqLen(req, len, len);
    453    len <<= 2;
    454    _XSend(dpy, (char *)extents, len);
    455 
    456    if (!_XReply(dpy, (xReply *)&rep,
    457                 (SIZEOF(xVMwareCtrlSetTopologyReply) - SIZEOF(xReply)) >> 2,
    458                 xFalse))
    459    {
    460        UnlockDisplay(dpy);
    461        SyncHandle();
    462        return false;
    463    }
    464    UnlockDisplay(dpy);
    465    SyncHandle();
    466    return true;
     438    xVMwareCtrlSetTopologyReply rep;
     439    xVMwareCtrlSetTopologyReq *req;
     440
     441    long len;
     442
     443    LockDisplay(dpy);
     444
     445    GetReq(VMwareCtrlSetTopology, req);
     446    req->reqType = hExtensionMajorOpcode;
     447    req->VMwareCtrlReqType = X_VMwareCtrlSetTopology;
     448    req->screen = screen;
     449    req->number = number;
     450
     451    len = ((long) number) << 1;
     452    SetReqLen(req, len, len);
     453    len <<= 2;
     454    _XSend(dpy, (char *)extents, len);
     455
     456    if (!_XReply(dpy, (xReply *)&rep,
     457                 (SIZEOF(xVMwareCtrlSetTopologyReply) - SIZEOF(xReply)) >> 2,
     458                 xFalse))
     459    {
     460        UnlockDisplay(dpy);
     461        SyncHandle();
     462        return false;
     463    }
     464    UnlockDisplay(dpy);
     465    SyncHandle();
     466    return true;
    467467}
    468468
     
    11531153{
    11541154    XGrabServer(x11Context.pDisplay);
     1155    /* In 32-bit guests GAs build on our release machines causes an xserver lock during vmware_ctrl extention
     1156     * if we do the call withing XGrab. So we disabled this call for 32-bit GAs. */
     1157#if ARCH_BITS != 32
    11551158    if (x11Context.fWmwareCtrlExtention)
    11561159        callVMWCTRL(paOutputs);
    1157 
     1160#endif
    11581161#ifdef WITH_DISTRO_XRAND_XINERAMA
    11591162    x11Context.pScreenResources = XRRGetScreenResources(x11Context.pDisplay, x11Context.rootWindow);
     
    13161319                    iRunningX += aOutputs[j].width;
    13171320            }
     1321            /* In 32-bit guests GAs build on our release machines causes an xserver lock during vmware_ctrl extention
     1322               if we do the call withing XGrab. We make the call the said extension only once (to connect the outputs)
     1323               rather than at each resize iteration. */
     1324#if ARCH_BITS == 32
     1325            if (fFirstRun)
     1326                callVMWCTRL(aOutputs);
     1327#endif
    13181328            setXrandrTopology(aOutputs);
    13191329            /* Wait for some seconds and set toplogy again after the boot. In some desktop environments (cinnamon) where
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