Fix call to draw when no notifications are available
Draw should not be called when there are no notifications in the queue. This for unknown reasons causes a crash the next time we attempt to get the currently active window with a BadValue error from XGetWindowProperty. Fixes #630.
This commit is contained in:
parent
700a3225f2
commit
69a682ce34
@ -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));
|
||||
|
||||
|
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user