event: lazify screen update

Set root screen change flag in event handler, and update in
draw_callback.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
This commit is contained in:
Yuxuan Shui
2019-03-17 15:17:48 +00:00
parent e414fee91f
commit e8f2298159
4 changed files with 39 additions and 25 deletions

View File

@@ -25,6 +25,10 @@
#include "win.h"
#include "x.h"
enum root_flags {
ROOT_FLAGS_SCREEN_CHANGE = 1
};
// == Functions ==
// TODO move static inline functions that are only used in compton.c, into
// compton.c
@@ -62,6 +66,8 @@ void queue_redraw(session_t *ps);
void discard_ignore(session_t *ps, unsigned long sequence);
void set_root_flags(session_t *ps, uint64_t flags);
/**
* Set a <code>switch_t</code> array of all unset wintypes to true.
*/
@@ -151,5 +157,3 @@ static inline void dump_drawable(session_t *ps, xcb_drawable_t drawable) {
drawable, r->x, r->y, r->width, r->height, r->border_width, r->depth);
free(r);
}
// vim: set et sw=2 :