mirror of
https://github.com/labwc/labwc.git
synced 2025-11-04 13:30:07 -05:00
tearing: add fullscreen options (#1941)
Co-authored-by: Consolatis <35009135+Consolatis@users.noreply.github.com>
This commit is contained in:
parent
19f0b769de
commit
433a4509af
9 changed files with 105 additions and 20 deletions
|
|
@ -15,8 +15,15 @@ set_tearing_hint(struct wl_listener *listener, void *data)
|
|||
{
|
||||
struct tearing_controller *controller = wl_container_of(listener, controller, set_hint);
|
||||
struct view *view = view_from_wlr_surface(controller->tearing_control->surface);
|
||||
if (view && controller->tearing_control->current) {
|
||||
view->tearing_hint = true;
|
||||
if (view) {
|
||||
/*
|
||||
* tearing_control->current is actually an enum:
|
||||
* WP_TEARING_CONTROL_V1_PRESENTATION_HINT_VSYNC = 0
|
||||
* WP_TEARING_CONTROL_V1_PRESENTATION_HINT_ASYNC = 1
|
||||
*
|
||||
* Using it as a bool here allows us to not ship the XML.
|
||||
*/
|
||||
view->tearing_hint = controller->tearing_control->current;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue