diff options
Diffstat (limited to 'include/sway/tree/view.h')
-rw-r--r-- | include/sway/tree/view.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/include/sway/tree/view.h b/include/sway/tree/view.h index 3ae8cf22..14aad1a1 100644 --- a/include/sway/tree/view.h +++ b/include/sway/tree/view.h | |||
@@ -4,6 +4,7 @@ | |||
4 | #include <wlr/config.h> | 4 | #include <wlr/config.h> |
5 | #include <wlr/types/wlr_compositor.h> | 5 | #include <wlr/types/wlr_compositor.h> |
6 | #include <wlr/types/wlr_scene.h> | 6 | #include <wlr/types/wlr_scene.h> |
7 | #include <wlr/types/wlr_tearing_control_v1.h> | ||
7 | #include "sway/config.h" | 8 | #include "sway/config.h" |
8 | #if WLR_HAS_XWAYLAND | 9 | #if WLR_HAS_XWAYLAND |
9 | #include <wlr/xwayland.h> | 10 | #include <wlr/xwayland.h> |
@@ -34,6 +35,12 @@ enum sway_view_prop { | |||
34 | #endif | 35 | #endif |
35 | }; | 36 | }; |
36 | 37 | ||
38 | enum sway_view_tearing_mode { | ||
39 | TEARING_OVERRIDE_FALSE, | ||
40 | TEARING_OVERRIDE_TRUE, | ||
41 | TEARING_WINDOW_HINT, | ||
42 | }; | ||
43 | |||
37 | struct sway_view_impl { | 44 | struct sway_view_impl { |
38 | void (*get_constraints)(struct sway_view *view, double *min_width, | 45 | void (*get_constraints)(struct sway_view *view, double *min_width, |
39 | double *max_width, double *min_height, double *max_height); | 46 | double *max_width, double *min_height, double *max_height); |
@@ -111,6 +118,9 @@ struct sway_view { | |||
111 | int max_render_time; // In milliseconds | 118 | int max_render_time; // In milliseconds |
112 | 119 | ||
113 | enum seat_config_shortcuts_inhibit shortcuts_inhibit; | 120 | enum seat_config_shortcuts_inhibit shortcuts_inhibit; |
121 | |||
122 | enum sway_view_tearing_mode tearing_mode; | ||
123 | enum wp_tearing_control_v1_presentation_hint tearing_hint; | ||
114 | }; | 124 | }; |
115 | 125 | ||
116 | struct sway_xdg_shell_view { | 126 | struct sway_xdg_shell_view { |
@@ -335,4 +345,6 @@ void view_assign_ctx(struct sway_view *view, struct launcher_ctx *ctx); | |||
335 | 345 | ||
336 | void view_send_frame_done(struct sway_view *view); | 346 | void view_send_frame_done(struct sway_view *view); |
337 | 347 | ||
348 | bool view_can_tear(struct sway_view *view); | ||
349 | |||
338 | #endif | 350 | #endif |