| 227 | |
| 228 | |
| 229 | Window XCreateWindow(Display *dpy, Window parent, int x, int y, |
| 230 | unsigned int width, unsigned int height, unsigned int border_width, |
| 231 | int depth, unsigned int c_class, Visual *visual, unsigned long valuemask, |
| 232 | XSetWindowAttributes *attributes) |
| 233 | { |
| 234 | Window win = 0; |
| 235 | TRY(); |
| 236 | |
| 237 | if(IS_EXCLUDED(dpy)) |
| 238 | return _XCreateWindow(dpy, parent, x, y, width, height, border_width, |
| 239 | depth, c_class, visual, valuemask, attributes); |
| 240 | |
| 241 | ///////////////////////////////////////////////////////////////////////////// |
| 242 | OPENTRACE(XCreateWindow); PRARGD(dpy); PRARGX(parent); PRARGI(x); |
| 243 | PRARGI(y); PRARGI(width); PRARGI(height); PRARGI(depth); PRARGI(c_class); |
| 244 | PRARGV(visual); STARTTRACE(); |
| 245 | ///////////////////////////////////////////////////////////////////////////// |
| 246 | |
| 247 | win = _XCreateWindow(dpy, parent, x, y, width, height, border_width, depth, |
| 248 | c_class, visual, valuemask, attributes); |
| 249 | if(win) WINHASH.add(dpy, win); |
| 250 | |
| 251 | ///////////////////////////////////////////////////////////////////////////// |
| 252 | STOPTRACE(); PRARGX(win); CLOSETRACE(); |
| 253 | ///////////////////////////////////////////////////////////////////////////// |
| 254 | |
| 255 | CATCH(); |
| 256 | return win; |
| 257 | } |
| 258 | |
| 259 | |
| 260 | // When a window is destroyed, we shut down the corresponding VirtualWin |