VirtualBox

Ignore:
Timestamp:
Mar 17, 2014 2:25:13 PM (11 years ago)
Author:
vboxsync
Message:

crOpenGL: do not create invisible windows (fix OSX deadlock)

Location:
trunk/src/VBox/HostServices/SharedOpenGL/crserverlib
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_main.c

    r50799 r50802  
    10051005            return NULL;
    10061006        }
    1007         id = crServerMuralInit(pMural, "", visualBits, 0);
     1007        id = crServerMuralInit(pMural,
     1008#ifdef RT_OS_DARWIN
     1009                /* tested on darwin only so far */
     1010                NULL
     1011#else
     1012                ""
     1013#endif
     1014                , visualBits, 0);
    10081015        if (id < 0)
    10091016        {
  • trunk/src/VBox/HostServices/SharedOpenGL/crserverlib/server_window.c

    r50625 r50802  
    2424    GLint dims[2];
    2525    GLint windowID = -1;
    26     GLint spuWindow;
     26    GLint spuWindow = 0;
    2727    GLint realVisBits = visBits;
    2828
     
    3232        realVisBits = cr_server.fVisualBitsDefault;
    3333
    34     /*
    35      * Have first SPU make a new window.
    36      */
    37     spuWindow = cr_server.head_spu->dispatch_table.WindowCreate( dpyName, realVisBits );
    38     if (spuWindow < 0) {
    39         return spuWindow;
     34    if (!dpyName)
     35    {
     36        /*
     37         * Have first SPU make a new window.
     38         */
     39        spuWindow = cr_server.head_spu->dispatch_table.WindowCreate( dpyName, realVisBits );
     40        if (spuWindow < 0) {
     41            return spuWindow;
     42        }
     43    }
     44    else
     45    {
     46        CRMuralInfo *dummy = crServerGetDummyMural(visBits);
     47        if (!dummy)
     48        {
     49            WARN(("crServerGetDummyMural failed"));
     50            return -1;
     51        }
     52        spuWindow = dummy->spuWindow;
    4053    }
    4154
     
    202215    }
    203216
    204     cr_server.head_spu->dispatch_table.WindowDestroy( mural->spuWindow );
     217    if (!mural->CreateInfo.pszDpyName)
     218        cr_server.head_spu->dispatch_table.WindowDestroy( mural->spuWindow );
     219
     220    mural->spuWindow = 0;
    205221
    206222    if (mural->pVisibleRects)
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