Browse files

Fix resize handling.

getch returns KEY_RESIZE if the window, containing the console app, is resized.
Add it to the check.
  • Loading branch information...
1 parent 5d9fa2b commit 05dbe6e18895d1037ce333b0a1f652eeae3f8b33 @txdv txdv committed with migueldeicaza Mar 12, 2011
Showing with 2 additions and 1 deletion.
  1. +1 −0 attrib.c
  2. +1 −1 gui.cs
View
1 attrib.c
@@ -121,6 +121,7 @@ main (int argc, char *argv [])
put2 ("F8", KEY_F(8));
put2 ("F9", KEY_F(9));
put2 ("F10", KEY_F(10));
+ put2 ("Resize", KEY_RESIZE);
diff = COLOR_PAIR (1) - COLOR_PAIR(0);
fprintf (OUT, "\n\n\tstatic public int ColorPair(int n){\n"
View
2 gui.cs
@@ -2824,7 +2824,7 @@ static void ProcessChar (Container container)
{
int ch = Curses.getch ();
- if (ch == -1){
+ if ((ch == -1) || (ch == Curses.KeyResize)){
if (Curses.CheckWinChange ()){
EmptyContainer.Clear ();
foreach (Container c in toplevels)

0 comments on commit 05dbe6e

Please sign in to comment.