VirtualBox

Ignore:
Timestamp:
Mar 14, 2013 11:25:56 AM (12 years ago)
Author:
vboxsync
Message:

crOpenGL/glx: do not allow zero window sizes

Location:
trunk/src/VBox/HostServices/SharedOpenGL/render
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu.c

    r44997 r45036  
    613613    window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, win);
    614614    if (window) {
     615        GLboolean visible;
    615616        if (window->nativeWindow) {
    616617            /* We're rendering back to the native app window instead of the
     
    620621            flag = 0;
    621622        }
    622         renderspu_SystemShowWindow( window, (GLboolean) flag );
     623       
     624        visible = !!flag;
     625       
     626        if (window->visible != visible)
     627        {
     628            renderspu_SystemShowWindow( window, visible );
     629            window->visible != visible;
     630        }
    623631    }
    624632    else {
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_agl.c

    r44997 r45036  
    603603        CHECK_CARBON_RC_RETURN_VOID (status, "Render SPU (renderspu_SystemShowWindow): PostEventToQueue Failed");
    604604    }
    605     /* Save the new value */
    606     window->visible = showIt;
    607605}
    608606
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_glx.c

    r44997 r45036  
    17541754    }
    17551755    else {
     1756        if (!w || !h)
     1757        {
     1758            /* X can not handle zero sizes */
     1759            if (window->visible)
     1760            {
     1761                renderspu_SystemShowWindow( window, GL_FALSE );
     1762                return;
     1763            }
     1764        }
    17561765        /* Resize ordinary X window */
    17571766        /*
     
    17671776        XResizeWindow(window->visual->dpy, window->window, w, h);
    17681777        XSync(window->visual->dpy, 0);
     1778       
     1779        if (!window->BltInfo.width || !window->BltInfo.height)
     1780        {
     1781            /* we have hidden the window instead of sizing it to (0;0) since X is unable to handle zero sizes */
     1782            if (window->visible)
     1783            {
     1784                renderspu_SystemShowWindow( window, GL_TRUE );
     1785                return;
     1786            }
     1787        }
    17691788#if 0
    17701789        for (attempt = 0; attempt < 3; attempt++) { /* try three times max */
     
    17791798#endif
    17801799    }
    1781 
    1782     /* finally, save the new size */
    1783     window->BltInfo.width = w;
    1784     window->BltInfo.height = h;
    17851800}
    17861801
     
    19521967            XSync(window->visual->dpy, 0);
    19531968        }
    1954         window->visible = showIt;
    19551969    }
    19561970}
  • trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_wgl.c

    r44997 r45036  
    12421242        DeleteObject(hRgn);
    12431243    }
    1244     window->visible = showIt;
    12451244}
    12461245
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