X11: Cleanup

We can use C99 now and also we will need the event mask below.
This commit is contained in:
Camilla Löwy 2019-12-22 09:12:59 +01:00
parent 74a46dfa0c
commit 8149a5fc00

View File

@ -613,13 +613,8 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,
window->x11.transparent = _glfwIsVisualTransparentX11(visual); window->x11.transparent = _glfwIsVisualTransparentX11(visual);
// Create the actual window XSetWindowAttributes wa = { 0 };
{
XSetWindowAttributes wa;
const unsigned long wamask = CWBorderPixel | CWColormap | CWEventMask;
wa.colormap = window->x11.colormap; wa.colormap = window->x11.colormap;
wa.border_pixel = 0;
wa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask | wa.event_mask = StructureNotifyMask | KeyPressMask | KeyReleaseMask |
PointerMotionMask | ButtonPressMask | ButtonReleaseMask | PointerMotionMask | ButtonPressMask | ButtonReleaseMask |
ExposureMask | FocusChangeMask | VisibilityChangeMask | ExposureMask | FocusChangeMask | VisibilityChangeMask |
@ -629,13 +624,13 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,
window->x11.handle = XCreateWindow(_glfw.x11.display, window->x11.handle = XCreateWindow(_glfw.x11.display,
_glfw.x11.root, _glfw.x11.root,
0, 0, 0, 0, // Position
width, height, width, height,
0, // Border width 0, // Border width
depth, // Color depth depth, // Color depth
InputOutput, InputOutput,
visual, visual,
wamask, CWBorderPixel | CWColormap | CWEventMask,
&wa); &wa);
_glfwReleaseErrorHandlerX11(); _glfwReleaseErrorHandlerX11();
@ -651,7 +646,6 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,
window->x11.handle, window->x11.handle,
_glfw.x11.context, _glfw.x11.context,
(XPointer) window); (XPointer) window);
}
if (!wndconfig->decorated) if (!wndconfig->decorated)
_glfwPlatformSetWindowDecorated(window, GLFW_FALSE); _glfwPlatformSetWindowDecorated(window, GLFW_FALSE);