mirror of
https://github.com/DreamMaoMao/maomaowm.git
synced 2025-10-29 05:40:21 -04:00
feat: add option to disable syncobj for nvidia
This commit is contained in:
parent
eeed7939aa
commit
f202a16abe
3 changed files with 7 additions and 1 deletions
|
|
@ -241,6 +241,7 @@ typedef struct {
|
|||
|
||||
int single_scratchpad;
|
||||
int xwayland_persistence;
|
||||
int syncobj_enable;
|
||||
|
||||
struct xkb_rule_names xkb_rules;
|
||||
} Config;
|
||||
|
|
@ -876,6 +877,8 @@ void parse_config_line(Config *config, const char *line) {
|
|||
config->single_scratchpad = atoi(value);
|
||||
} else if (strcmp(key, "xwayland_persistence") == 0) {
|
||||
config->xwayland_persistence = atoi(value);
|
||||
} else if (strcmp(key, "syncobj_enable") == 0) {
|
||||
config->syncobj_enable = atoi(value);
|
||||
} else if (strcmp(key, "no_border_when_single") == 0) {
|
||||
config->no_border_when_single = atoi(value);
|
||||
} else if (strcmp(key, "snap_distance") == 0) {
|
||||
|
|
@ -1969,6 +1972,7 @@ void override_config(void) {
|
|||
|
||||
// 杂项设置
|
||||
xwayland_persistence = CLAMP_INT(config.xwayland_persistence, 0, 1);
|
||||
syncobj_enable = CLAMP_INT(config.syncobj_enable, 0, 1);
|
||||
axis_bind_apply_timeout =
|
||||
CLAMP_INT(config.axis_bind_apply_timeout, 0, 1000);
|
||||
focus_on_activate = CLAMP_INT(config.focus_on_activate, 0, 1);
|
||||
|
|
@ -2091,6 +2095,7 @@ void set_value_default() {
|
|||
config.focus_cross_tag = focus_cross_tag;
|
||||
config.single_scratchpad = single_scratchpad;
|
||||
config.xwayland_persistence = xwayland_persistence;
|
||||
config.syncobj_enable = syncobj_enable;
|
||||
config.no_border_when_single = no_border_when_single;
|
||||
config.snap_distance = snap_distance;
|
||||
config.drag_tile_to_tile = drag_tile_to_tile;
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ float fullscreen_bg[] = {0.1, 0.1, 0.1, 1.0};
|
|||
|
||||
int warpcursor = 1; /* Warp cursor to focused client */
|
||||
int xwayland_persistence = 1; /* xwayland persistence */
|
||||
int syncobj_enable = 0;
|
||||
|
||||
/* layout(s) */
|
||||
Layout overviewlayout = {"", overview, "overview"};
|
||||
|
|
|
|||
|
|
@ -6430,7 +6430,7 @@ void setup(void) {
|
|||
scene, wlr_linux_dmabuf_v1_create_with_renderer(dpy, 5, drw));
|
||||
}
|
||||
|
||||
if ((drm_fd = wlr_renderer_get_drm_fd(drw)) >= 0 &&
|
||||
if (syncobj_enable && (drm_fd = wlr_renderer_get_drm_fd(drw)) >= 0 &&
|
||||
drw->features.timeline && backend->features.timeline)
|
||||
wlr_linux_drm_syncobj_manager_v1_create(dpy, 1, drm_fd);
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue