| 1033 | // drawable. |
| 1034 | |
| 1035 | Display *glXGetCurrentDisplay(void) |
| 1036 | { |
| 1037 | Display *dpy = NULL; faker::VirtualWin *vw; |
| 1038 | |
| 1039 | if(faker::getGLXExcludeCurrent()) return _glXGetCurrentDisplay(); |
| 1040 | |
| 1041 | TRY(); |
| 1042 | |
| 1043 | ///////////////////////////////////////////////////////////////////////////// |
| 1044 | OPENTRACE(glXGetCurrentDisplay); STARTTRACE(); |
| 1045 | ///////////////////////////////////////////////////////////////////////////// |
| 1046 | |
| 1047 | GLXDrawable curdraw = backend::getCurrentDrawable(); |
| 1048 | if((vw = WINHASH.find(NULL, curdraw)) != NULL) |
| 1049 | dpy = vw->getX11Display(); |
| 1050 | else if(curdraw) |
| 1051 | dpy = GLXDHASH.getCurrentDisplay(curdraw); |
| 1052 | |
| 1053 | ///////////////////////////////////////////////////////////////////////////// |
| 1054 | STOPTRACE(); PRARGD(dpy); CLOSETRACE(); |
| 1055 | ///////////////////////////////////////////////////////////////////////////// |
| 1056 | |
| 1057 | CATCH(); |
| 1058 | return dpy; |
| 1059 | } |
| 1060 | |
| 1061 | Display *glXGetCurrentDisplayEXT(void) |
| 1062 | { |
no test coverage detected