diff options
author | dec05eba <dec05eba@protonmail.com> | 2024-11-26 18:27:56 +0100 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2024-11-26 18:27:56 +0100 |
commit | 5cfca3e55a49e8656c987c1e8b15da3c4380d6ff (patch) | |
tree | bb890f096d7f6eba3d27cb9f1069fb2c9a860128 /src/Overlay.cpp | |
parent | 99acbdb59617460e29acd708b96de2f1f1fb4f88 (diff) |
Properly close program when disconnected from the X server
Diffstat (limited to 'src/Overlay.cpp')
-rw-r--r-- | src/Overlay.cpp | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/Overlay.cpp b/src/Overlay.cpp index f19e460..25817f5 100644 --- a/src/Overlay.cpp +++ b/src/Overlay.cpp @@ -642,11 +642,11 @@ namespace gsr { make_window_sticky(display, window->get_system_handle()); hide_window_from_taskbar(display, window->get_system_handle()); - if(default_cursor) { - XFreeCursor(display, default_cursor); - default_cursor = 0; - } - default_cursor = XCreateFontCursor(display, XC_arrow); + // if(default_cursor) { + // XFreeCursor(display, default_cursor); + // default_cursor = 0; + // } + // default_cursor = XCreateFontCursor(display, XC_arrow); // TODO: Retry if these fail. // TODO: Hmm, these dont work in owlboy. Maybe owlboy uses xi2 and that breaks this (does it?). @@ -701,14 +701,14 @@ namespace gsr { page_stack.pop(); } - if(default_cursor) { - XFreeCursor(display, default_cursor); - default_cursor = 0; - } + // if(default_cursor) { + // XFreeCursor(display, default_cursor); + // default_cursor = 0; + // } - XUngrabKeyboard(display, CurrentTime); - XUngrabPointer(display, CurrentTime); - XFlush(display); + // XUngrabKeyboard(display, CurrentTime); + // XUngrabPointer(display, CurrentTime); + // XFlush(display); window_texture_deinit(&window_texture); window_texture_sprite.set_texture(nullptr); |