diff --git a/src/draw.c b/src/draw.c index 7dbe55f..80468b5 100644 --- a/src/draw.c +++ b/src/draw.c @@ -611,6 +611,7 @@ static void calc_window_pos(int width, int height, int *ret_x, int *ret_y) void draw(void) { + assert(queues_length_displayed() > 0); GSList *layouts = create_layouts(x_win_get_context(win)); diff --git a/src/x11/x.c b/src/x11/x.c index e5f8177..5606762 100644 --- a/src/x11/x.c +++ b/src/x11/x.c @@ -341,7 +341,10 @@ gboolean x_mainloop_fd_dispatch(GSource *source, GSourceFunc callback, gpointer LOG_D("XEvent: processing PropertyNotify for Resource manager"); XRM_update_db(); screen_dpi_xft_cache_purge(); - draw(); + + if (win->visible) { + draw(); + } break; } /* Explicitly fallthrough. Other PropertyNotify events, e.g. catching