mirror of
https://github.com/glfw/glfw.git
synced 2024-11-10 00:51:47 +00:00
X11: Cleanup
We can use C99 now and also we will need the event mask below.
This commit is contained in:
parent
74a46dfa0c
commit
8149a5fc00
@ -613,13 +613,8 @@ static GLFWbool 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 |
|
||||
@ -629,13 +624,13 @@ static GLFWbool 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();
|
||||
@ -651,7 +646,6 @@ static GLFWbool createNativeWindow(_GLFWwindow* window,
|
||||
window->x11.handle,
|
||||
_glfw.x11.context,
|
||||
(XPointer) window);
|
||||
}
|
||||
|
||||
if (!wndconfig->decorated)
|
||||
_glfwPlatformSetWindowDecorated(window, GLFW_FALSE);
|
||||
|
Loading…
Reference in New Issue
Block a user