tearing protocol support and documentation

This commit is contained in:
Ph42oN 2024-01-04 01:24:29 +02:00
parent 2f0a9ef158
commit fc69b80234
11 changed files with 112 additions and 19 deletions

View file

@ -273,16 +273,6 @@ set_adaptive_sync_fullscreen(struct view *view)
wlr_output_commit(view->output->wlr_output);
}
static void
set_tearing_fullscreen(struct view *view)
{
if (rc.allow_tearing != LAB_TEARING_FULLSCREEN) {
return;
}
/* Enable tearing if view is fullscreen */
view->output->tearing = view->fullscreen;
}
void
view_set_activated(struct view *view, bool activated)
{
@ -307,7 +297,7 @@ view_set_activated(struct view *view, bool activated)
}
}
set_adaptive_sync_fullscreen(view);
set_tearing_fullscreen(view);
set_tearing(view->output);
}
void
@ -1210,7 +1200,7 @@ view_set_fullscreen(struct view *view, bool fullscreen)
view_apply_special_geometry(view);
}
set_adaptive_sync_fullscreen(view);
set_tearing_fullscreen(view);
set_tearing(view->output);
}
void
@ -1881,9 +1871,6 @@ view_destroy(struct view *view)
if (rc.adaptive_sync == LAB_ADAPTIVE_SYNC_FULLSCREEN) {
wlr_output_enable_adaptive_sync(view->output->wlr_output, false);
}
if (rc.allow_tearing == LAB_TEARING_FULLSCREEN) {
view->output->tearing = false;
}
}
/* If we spawned a window menu, close it */