From 8b74a756c2a1eaa95120ce8fcf56540f1f29cbb5 Mon Sep 17 00:00:00 2001 From: Nikos Tsipinakis Date: Thu, 4 May 2017 17:34:10 +0300 Subject: [PATCH] Redraw the window after an expose event Expose events, according to the X11 documentation, signify when the contents of a window region have been lost but until now we have been ignoring this event for unknown reasons. Handle this event by redrawing the window entirely. While this is not a perfect solution, the optimal one would be to only redraw the region that was lost, it's simpler to implement currently and better than losing the contents of the window entirely. --- src/x11/x.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/x11/x.c b/src/x11/x.c index 73ab708..36ca5e5 100644 --- a/src/x11/x.c +++ b/src/x11/x.c @@ -814,6 +814,7 @@ gboolean x_mainloop_fd_dispatch(GSource * source, GSourceFunc callback, switch (ev.type) { case Expose: if (ev.xexpose.count == 0 && xctx.visible) { + x_win_draw(); } break; case SelectionNotify: