X11: Cleanup

From upstream: 8149a5fc00.
This commit is contained in:
Luflosi 2020-01-03 02:01:35 +01:00
parent b653711446
commit b9a08eacb0
No known key found for this signature in database
GPG Key ID: 4E41E29EDCC345D0

12
glfw/x11_window.c vendored
View File

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