if (getenv("DISPLAY")) {
_al_mutex_lock(&system->lock);
Window root = RootWindow(
system->x11display, DefaultScreen(system->x11display));
XWindowAttributes attr;
XGetWindowAttributes(system->x11display, root, &attr);
d->window = XCreateWindow(
system->x11display,
root,
0,
0,
attr.width,
attr.height,
0, 0,
InputOnly,
DefaultVisual(system->x11display, 0),
0,
NULL
);
XGetWindowAttributes(system->x11display, d->window, &attr);
XSelectInput(
system->x11display,
d->window,
PointerMotionMask | KeyPressMask | KeyReleaseMask | ButtonPressMask | ButtonReleaseMask
/*
StructureNotifyMask | FocusChangeMask | PointerMotionMask
| KeyPressMask | KeyReleaseMask | ButtonPressMask
| ButtonReleaseMask | PropertyChangeMask
*/
);
XMapWindow(system->x11display, d->window);
//XSetInputFocus(system->x11display, d->window, RevertToParent, CurrentTime);
_al_xwin_reset_size_hints(display);
_al_xwin_set_fullscreen_window(display, 2);
_al_xwin_set_size_hints(display, INT_MAX, INT_MAX);
d->wm_delete_window_atom = XInternAtom(system->x11display,
"WM_DELETE_WINDOW", False);
XSetWMProtocols(system->x11display, d->window, &d->wm_delete_window_atom, 1);
_al_mutex_unlock(&system->lock);
}