From 531d469212a310c85bfb4cd2826f5b1499746c40 Mon Sep 17 00:00:00 2001 From: Stefan Arentz Date: Sun, 18 Dec 2016 22:19:44 -0500 Subject: [PATCH] Fixes #75 Force screen update after changing window mode --- src/one.c | 3 +++ src/two.c | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/src/one.c b/src/one.c index 06f85ca..55648a1 100644 --- a/src/one.c +++ b/src/one.c @@ -87,6 +87,9 @@ static bool ewm_one_poll_event(struct ewm_one_t *one, SDL_Window *window) { switch (event.type) { case SDL_QUIT: return false; + case SDL_WINDOWEVENT: + one->tty->screen_dirty = true; + break; case SDL_KEYDOWN: if (event.key.keysym.mod & KMOD_CTRL) { if (event.key.keysym.sym >= SDLK_a && event.key.keysym.sym <= SDLK_z) { diff --git a/src/two.c b/src/two.c index f2a4622..f6dbb78 100644 --- a/src/two.c +++ b/src/two.c @@ -326,6 +326,10 @@ static bool ewm_two_poll_event(struct ewm_two_t *two, SDL_Window *window) { // T case SDL_QUIT: return false; + case SDL_WINDOWEVENT: + two->screen_dirty = true; + break; + case SDL_JOYBUTTONDOWN: if (event.jbutton.button < EWM_A2P_BUTTON_COUNT) { two->buttons[event.jbutton.button] = 1;