mirror of
https://github.com/Tha14/toxic.git
synced 2024-11-22 22:43:01 +01:00
refresh windows after resize
This commit is contained in:
parent
202d162d2e
commit
0ac97aa794
9
main.c
9
main.c
@ -8,6 +8,7 @@
|
|||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
#include <stdbool.h>
|
#include <stdbool.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
#ifdef _win32
|
#ifdef _win32
|
||||||
#include <direct.h>
|
#include <direct.h>
|
||||||
@ -25,9 +26,17 @@
|
|||||||
#include "friendlist.h"
|
#include "friendlist.h"
|
||||||
|
|
||||||
|
|
||||||
|
void on_window_resize(int sig)
|
||||||
|
{
|
||||||
|
endwin();
|
||||||
|
refresh();
|
||||||
|
clear();
|
||||||
|
}
|
||||||
|
|
||||||
static void init_term()
|
static void init_term()
|
||||||
{
|
{
|
||||||
/* Setup terminal */
|
/* Setup terminal */
|
||||||
|
signal(SIGWINCH, on_window_resize);
|
||||||
initscr();
|
initscr();
|
||||||
cbreak();
|
cbreak();
|
||||||
keypad(stdscr, 1);
|
keypad(stdscr, 1);
|
||||||
|
Loading…
Reference in New Issue
Block a user