diff options
-rw-r--r-- | gui.c | 4 |
1 files changed, 4 insertions, 0 deletions
@@ -19,6 +19,7 @@ #include <SDL2/SDL.h> #include <stdbool.h> +#include <unistd.h> #include "xmpp.h" @@ -65,6 +66,9 @@ void gui_run(void) { case SDL_MOUSEBUTTONDOWN: if (xmpp_fd == -1) { xmpp_fd = xmpp_connect(); + } else { + close(xmpp_fd); + printf("Closed XMPP connection.\n"); } break; } |