mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-10-29 05:40:12 -04:00
backend/wayland: commit null buffer only on unmap
If the guest compositor disabled an output and then immediately committed another state, we would perform a commit with a null buffer, which is against the protocol, as the host compositor expects an initial commit with no buffer at all.
This commit is contained in:
parent
baf1e4f674
commit
d9f6498f8a
1 changed files with 4 additions and 2 deletions
|
|
@ -548,7 +548,9 @@ static bool output_commit(struct wlr_output *wlr_output,
|
|||
return false;
|
||||
}
|
||||
|
||||
if ((state->committed & WLR_OUTPUT_STATE_ENABLED) && !state->enabled) {
|
||||
bool pending_enabled = output_pending_enabled(wlr_output, state);
|
||||
|
||||
if (wlr_output->enabled && !pending_enabled) {
|
||||
wl_surface_attach(output->surface, NULL, 0, 0);
|
||||
wl_surface_commit(output->surface);
|
||||
}
|
||||
|
|
@ -575,7 +577,7 @@ static bool output_commit(struct wlr_output *wlr_output,
|
|||
return false;
|
||||
}
|
||||
|
||||
if (output_pending_enabled(wlr_output, state)) {
|
||||
if (pending_enabled) {
|
||||
if (output->frame_callback != NULL) {
|
||||
wl_callback_destroy(output->frame_callback);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue