author | Max Kellermann <max@duempel.org> | |
Fri, 19 Sep 2008 06:02:40 +0000 (08:02 +0200) | ||
committer | Max Kellermann <max@duempel.org> | |
Fri, 19 Sep 2008 06:02:40 +0000 (08:02 +0200) | ||
commit | 9ed50c768c9169fd6b968a91edeb161694cf9fcf | |
tree | 2c97b11bbe5f3500f7b33a37ec2e86586e05c6d7 | tree | snapshot |
parent | 5fa6d11cc8b1a22456ec90416089e2f40a9f1763 | commit | diff |
fix terminal resizing (SIGWINCH)
When I replaced ncmpc's old main loop with g_main_loop from libglib,
SIGWINCH (i.e. window resizing) stopped working. This regression was
caused by the fact that ncurses' wgetch() function was only called
when there was actually data on STDIN. wgetch() has several side
effects besides reading data from STDIN, for example it checks whether
there has been a window resize.
Fix this with a custom SIGWINCH handler.
When I replaced ncmpc's old main loop with g_main_loop from libglib,
SIGWINCH (i.e. window resizing) stopped working. This regression was
caused by the fact that ncurses' wgetch() function was only called
when there was actually data on STDIN. wgetch() has several side
effects besides reading data from STDIN, for example it checks whether
there has been a window resize.
Fix this with a custom SIGWINCH handler.
src/main.c | diff | blob | history |