diff options
-rw-r--r-- | hcalc.h | 3 | ||||
-rw-r--r-- | input.c | 2 | ||||
-rw-r--r-- | setupx.c | 8 |
3 files changed, 10 insertions, 3 deletions
@@ -53,9 +53,10 @@ void button(int b, int x, int y); void complete_paste(unsigned char *s, int n); void send_current_display(void); void setup_x(void); +void shutdown_x(void); void free_pixmaps(void); void load_pixmaps(void); -void process_input(); +void process_input(void); void load_config(void); void save_config(void); void show_value(void); @@ -433,7 +433,7 @@ void key(char c) { winsize++; if(winsize == 3) winsize = 0; free_pixmaps(); - XCloseDisplay(display); + shutdown_x(); setup_x(); load_pixmaps(); show_value(); @@ -92,7 +92,13 @@ void setup_x(void) { bit_off = color.pixel; } -void process_input() { +void shutdown_x(void) { + XDestroyWindow(display, window); + XFreeGC(display, gc); + XCloseDisplay(display); +} + +void process_input(void) { char c; KeySym keysym; XTextProperty tprop; |