about summary refs log tree commit diff stats
path: root/070display.cc
diff options
context:
space:
mode:
authorKartik K. Agaram <vc@akkartik.com>2015-08-09 18:44:34 -0700
committerKartik K. Agaram <vc@akkartik.com>2015-08-09 18:44:34 -0700
commit6fef33fd0872ffcb5141a926d1dae5b0eded3071 (patch)
treedfe65c23796ab6ae7fcb6103d0335146883e96c7 /070display.cc
parent051c47384e34b2e2e077cc3665bba7e95b1a562d (diff)
downloadmu-6fef33fd0872ffcb5141a926d1dae5b0eded3071.tar.gz
1963 - redraw if window size changes
This was important because somebody connecting on tmux would mess up the
environment.
Diffstat (limited to '070display.cc')
-rw-r--r--070display.cc12
1 files changed, 9 insertions, 3 deletions
diff --git a/070display.cc b/070display.cc
index 976be637..ce6d657f 100644
--- a/070display.cc
+++ b/070display.cc
@@ -335,8 +335,6 @@ case CHECK_FOR_INTERACTION: {
     break;
   }
   if (event_type == TB_EVENT_MOUSE) {
-//?     tb_shutdown(); //? 1
-//?     cerr << "AAA\n"; //? 1
     products.at(0).push_back(/*touch event*/2);
     products.at(0).push_back(event.key);  // which button, etc.
     products.at(0).push_back(event.y);  // row
@@ -344,7 +342,15 @@ case CHECK_FOR_INTERACTION: {
     products.at(1).push_back(/*found*/true);
     break;
   }
-  // ignore TB_EVENT_RESIZE events for now
+  if (event_type == TB_EVENT_RESIZE) {
+    products.at(0).push_back(/*resize event*/3);
+    products.at(0).push_back(event.w);  // width
+    products.at(0).push_back(event.h);  // height
+    products.at(0).push_back(0);
+    products.at(1).push_back(/*found*/true);
+    break;
+  }
+  assert(event_type == 0);
   products.at(0).push_back(0);
   products.at(0).push_back(0);
   products.at(0).push_back(0);