diff options
Diffstat (limited to 'gui.c')
-rw-r--r-- | gui.c | 14 |
1 files changed, 9 insertions, 5 deletions
@@ -6,6 +6,8 @@ #include <SDL2/SDL.h> #include <stdbool.h> +#include "xmpp.h" + void gui_run(void) { @@ -41,11 +43,13 @@ void gui_run(void) { while (!quit) { SDL_UpdateTexture(texture, NULL, pixels, 640 * sizeof(uint32_t)); SDL_WaitEvent(&event); - switch (event.type) - { - case SDL_QUIT: - quit = true; - break; + switch (event.type) { + case SDL_QUIT: + quit = true; + break; + case SDL_MOUSEBUTTONDOWN: + xmpp_connect(); + break; } SDL_RenderClear(renderer); SDL_RenderCopy(renderer, texture, NULL, NULL); |