no outputs can be specified
This commit is contained in:
parent
ba7b581b4d
commit
d4c078875b
2 changed files with 39 additions and 32 deletions
64
wayland.c
64
wayland.c
|
|
@ -556,39 +556,41 @@ struct event wait_for_event(struct client_state *state) {
|
|||
struct event event = { .type = EVENT_EXIT };
|
||||
return event;
|
||||
}
|
||||
while (true) {
|
||||
if (next == NULL) {
|
||||
next = state->surface_list;
|
||||
}
|
||||
|
||||
// do here
|
||||
if (next->data.dirty) {
|
||||
next->data.dirty = false;
|
||||
state->surface_list_next = next->next;
|
||||
|
||||
if (eglMakeCurrent(state->egl_display, next->data.egl_surface,
|
||||
next->data.egl_surface, state->egl_context)) {
|
||||
} else {
|
||||
fprintf(stderr, "Made current failed\n");
|
||||
if (state->surface_list != NULL) {
|
||||
while (true) {
|
||||
if (next == NULL) {
|
||||
next = state->surface_list;
|
||||
}
|
||||
struct event event = {
|
||||
.type = EVENT_DRAW,
|
||||
.data = {
|
||||
.draw = {
|
||||
.width = next->data.width,
|
||||
.height = next->data.height,
|
||||
.time = next->data.time,
|
||||
.surface = &next->data,
|
||||
}
|
||||
|
||||
// do here
|
||||
if (next->data.dirty) {
|
||||
next->data.dirty = false;
|
||||
state->surface_list_next = next->next;
|
||||
|
||||
if (eglMakeCurrent(state->egl_display, next->data.egl_surface,
|
||||
next->data.egl_surface, state->egl_context)) {
|
||||
} else {
|
||||
fprintf(stderr, "Made current failed\n");
|
||||
}
|
||||
};
|
||||
return event;
|
||||
}
|
||||
|
||||
next = next->next;
|
||||
if (next == original) {
|
||||
state->surface_list_next = next;
|
||||
break;
|
||||
struct event event = {
|
||||
.type = EVENT_DRAW,
|
||||
.data = {
|
||||
.draw = {
|
||||
.width = next->data.width,
|
||||
.height = next->data.height,
|
||||
.time = next->data.time,
|
||||
.surface = &next->data,
|
||||
}
|
||||
}
|
||||
};
|
||||
return event;
|
||||
}
|
||||
|
||||
next = next->next;
|
||||
if (next == original) {
|
||||
state->surface_list_next = next;
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
wl_display_dispatch(state->wl_display);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue