using dirty bits for poll-based frame events
This commit is contained in:
parent
33ceed2d22
commit
3311810666
3 changed files with 94 additions and 9 deletions
11
wayland.h
11
wayland.h
|
|
@ -8,9 +8,15 @@
|
|||
/// A desktop layer (wallpaper)
|
||||
#define OUTPUT_LAYER 1
|
||||
|
||||
#define DEFAULT_WIDTH 400
|
||||
#define DEFAULT_HEIGHT 400
|
||||
|
||||
struct surface {
|
||||
int width, height;
|
||||
|
||||
/// Wating to be redrawn.
|
||||
bool dirty;
|
||||
|
||||
struct wl_surface *wl_surface;
|
||||
struct xdg_surface *xdg_surface;
|
||||
struct xdg_toplevel *xdg_toplevel;
|
||||
|
|
@ -43,7 +49,8 @@ struct client_state {
|
|||
EGLContext egl_context;
|
||||
};
|
||||
|
||||
#define EVENT_DRAW 0
|
||||
#define EVENT_NONE 0
|
||||
#define EVENT_DRAW 1
|
||||
|
||||
struct event {
|
||||
int type;
|
||||
|
|
@ -58,5 +65,5 @@ struct event {
|
|||
void wayland_init(struct client_state *state, int output_type);
|
||||
void commit(struct client_state *state);
|
||||
/// Provide pointer to be filled.
|
||||
void wait_for_event(struct client_state *state, struct event event);
|
||||
struct event wait_for_event(struct client_state *state);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue