Add tearing support (#1390)

Co-authored-by: Andrew J. Hesford <ajh@sideband.org>
This commit is contained in:
Ph42oN 2024-01-08 22:58:58 +02:00 committed by GitHub
parent 72f3ce6b41
commit bce0c6ce56
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 111 additions and 1 deletions

View file

@ -53,6 +53,7 @@ struct rcxml {
bool xdg_shell_server_side_deco;
int gap;
enum adaptive_sync_mode adaptive_sync;
bool allow_tearing;
bool reuse_output_mode;
enum view_placement_policy placement_policy;

View file

@ -39,6 +39,7 @@
#include <wlr/types/wlr_drm_lease_v1.h>
#include <wlr/types/wlr_virtual_pointer_v1.h>
#include <wlr/types/wlr_virtual_keyboard_v1.h>
#include <wlr/types/wlr_tearing_control_v1.h>
#include <wlr/util/log.h>
#include "config/keybind.h"
#include "config/rcxml.h"
@ -318,6 +319,9 @@ struct server {
struct wlr_pointer_constraints_v1 *constraints;
struct wl_listener new_constraint;
struct wlr_tearing_control_manager_v1 *tearing_control;
struct wl_listener tearing_new_object;
/* Set when in cycle (alt-tab) mode */
struct osd_state {
struct view *cycle_view;
@ -478,6 +482,7 @@ void handle_output_power_manager_set_mode(struct wl_listener *listener,
void output_add_virtual(struct server *server, const char *output_name);
void output_remove_virtual(struct server *server, const char *output_name);
void output_enable_adaptive_sync(struct wlr_output *output, bool enabled);
void new_tearing_hint(struct wl_listener *listener, void *data);
void server_init(struct server *server);
void server_start(struct server *server);

View file

@ -151,6 +151,7 @@ struct view {
bool minimized;
enum view_axis maximized;
bool fullscreen;
bool tearing_hint;
bool visible_on_all_workspaces;
enum view_edge tiled;
bool inhibits_keybinds;