mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2025-11-15 06:59:43 -05:00
Fixed VT switching
This commit is contained in:
parent
091de12bf4
commit
55854565dc
6 changed files with 42 additions and 4 deletions
|
|
@ -116,6 +116,21 @@ static void wlr_drm_output_end(struct wlr_output_state *output) {
|
|||
output->bo[0] = bo;
|
||||
}
|
||||
|
||||
void wlr_drm_output_pause_renderer(struct wlr_output_state *output) {
|
||||
if (output->state != DRM_OUTPUT_CONNECTED) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (output->bo[1]) {
|
||||
gbm_surface_release_buffer(output->gbm, output->bo[1]);
|
||||
output->bo[1] = NULL;
|
||||
}
|
||||
if (output->bo[0]) {
|
||||
gbm_surface_release_buffer(output->gbm, output->bo[0]);
|
||||
output->bo[0] = NULL;
|
||||
}
|
||||
}
|
||||
|
||||
void wlr_drm_output_start_renderer(struct wlr_output_state *output) {
|
||||
if (output->state != DRM_OUTPUT_CONNECTED) {
|
||||
return;
|
||||
|
|
@ -608,7 +623,7 @@ static void page_flip_handler(int fd, unsigned seq,
|
|||
}
|
||||
|
||||
output->pageflip_pending = false;
|
||||
if (output->state == DRM_OUTPUT_CONNECTED) {
|
||||
if (output->state == DRM_OUTPUT_CONNECTED && state->session->active) {
|
||||
wlr_drm_output_begin(output);
|
||||
wl_signal_emit(&output->wlr_output->events.frame, output->wlr_output);
|
||||
wlr_drm_output_end(output);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue