- Timestamp:
- Nov 5, 2014 11:35:07 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/HostServices/SharedOpenGL/render/renderspu_glx.c
r52639 r53234 68 68 return WindowExistsFlag; 69 69 } 70 71 static GLboolean72 renderDestroyWindow( Display *dpy, Window w )73 {74 XWindowAttributes xwa;75 int (*oldXErrorHandler)(Display *, XErrorEvent *);76 77 WindowExistsFlag = GL_TRUE;78 oldXErrorHandler = XSetErrorHandler(WindowExistsErrorHandler);79 XGetWindowAttributes(dpy, w, &xwa); /* dummy request */80 if (xwa.map_state == IsViewable) {81 XDestroyWindow (dpy, w); /* dummy request */82 XSync (dpy,0);83 }84 XSetErrorHandler(oldXErrorHandler);85 return WindowExistsFlag;86 }87 88 #if 089 /*90 * Garbage collection function.91 * Loop over all known windows and check if corresponding X window still92 * exists. If it doesn't, destroy the render SPU window.93 * XXX seems to blow up with threadtest.conf tests.94 */95 void96 renderspu_GCWindow(void)97 {98 int i;99 WindowInfo *window;100 101 for (i = 0; i < (int)render_spu.window_id - 1; i++) {102 window = (WindowInfo *) crHashtableSearch(render_spu.windowTable, i);103 if (window->visual->dpy) {104 if (!WindowExists (window->visual->dpy, window->appWindow) ) {105 XSync(window->visual->dpy,0);106 if(WindowExists(window->visual->dpy, window->window)) {107 renderDestroyWindow(window->visual->dpy, window->window);108 }109 }110 }111 }112 }113 #endif114 70 115 71 static Colormap … … 1675 1631 1676 1632 } 1677 1678 #if 01679 /* XXX disabled for now due to problem with threadtest.conf */1680 renderspu_GCWindow();1681 #endif1682 1633 } 1683 1634
Note:
See TracChangeset
for help on using the changeset viewer.