aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2023-06-27 12:52:12 +0200
committerdec05eba <dec05eba@protonmail.com>2023-06-27 12:52:12 +0200
commit8d0c09bafe37653ed340acd89a27be6a4f928f9c (patch)
treead2b9cc1c7f86c1925d377f2fa8d77cc07ffa8a7 /src
parent3cc088e1c3866b57b4392bb8430774e7e40be57a (diff)
XInternAtom create if not exists
Diffstat (limited to 'src')
-rw-r--r--src/mgl.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/mgl.c b/src/mgl.c
index b2d2bb6..5b87134 100644
--- a/src/mgl.c
+++ b/src/mgl.c
@@ -27,7 +27,7 @@ int mgl_init(void) {
if(init_count == 1) {
context.connection = XOpenDisplay(NULL);
if(!context.connection) {
- fprintf(stderr, "mgl error:XOpenDisplay(NULL) failed\n");
+ fprintf(stderr, "mgl error: XOpenDisplay failed\n");
mgl_deinit();
return -1;
}
@@ -38,13 +38,8 @@ int mgl_init(void) {
XkbSetDetectableAutoRepeat(context.connection, True, NULL);
context.wm_delete_window_atom = XInternAtom(context.connection, "WM_DELETE_WINDOW", False);
- if(!context.wm_delete_window_atom) {
- mgl_deinit();
- return -1;
- }
-
- context.net_wm_ping_atom = XInternAtom(context.connection, "_NET_WM_PING", True);
- context.net_wm_pid_atom = XInternAtom(context.connection, "_NET_WM_PID", True);
+ context.net_wm_ping_atom = XInternAtom(context.connection, "_NET_WM_PING", False);
+ context.net_wm_pid_atom = XInternAtom(context.connection, "_NET_WM_PID", False);
if(mgl_gl_load(&context.gl) != 0) {
mgl_deinit();