| 119 | } |
| 120 | |
| 121 | bool compare(char *key1, Window key2, HashEntry *entry) |
| 122 | { |
| 123 | VirtualWin *vw = entry->value; |
| 124 | return ( |
| 125 | // Match 2D X Server display string and Window ID stored in |
| 126 | // VirtualDrawable instance |
| 127 | (vw && key1 && !strcasecmp(DisplayString(vw->getX11Display()), key1) |
| 128 | && key2 == vw->getX11Drawable()) |
| 129 | || |
| 130 | // If key1 is NULL, match off-screen drawable ID instead of X Window |
| 131 | // ID |
| 132 | (vw && key1 == NULL && key2 == vw->getGLXDrawable()) |
| 133 | || |
| 134 | // Direct match |
| 135 | (key1 && !strcasecmp(key1, entry->key1) && key2 == entry->key2) |
| 136 | ); |
| 137 | } |
| 138 | |
| 139 | static WindowHash *instance; |
| 140 | static util::CriticalSection instanceMutex; |
nothing calls this directly
no test coverage detected