fix: keep XWayland frame callbacks alive on hidden workspaces

Instead of disabling the scene node (which kills frame callbacks and
stalls games at 0 FPS), move XWayland clients far offscreen while
keeping the node enabled. Gated by xwayland_render_unfocused config
option (default on). Fixes #867.
This commit is contained in:
taya 2026-04-25 10:59:52 +02:00
parent b9c6a2c196
commit 1ebc8129ec
4 changed files with 63 additions and 8 deletions

View file

@ -358,6 +358,7 @@ typedef struct {
int32_t single_scratchpad;
int32_t xwayland_persistence;
int32_t xwayland_render_unfocused;
int32_t syncobj_enable;
float drag_tile_refresh_interval;
float drag_floating_refresh_interval;
@ -1414,6 +1415,8 @@ bool parse_option(Config *config, char *key, char *value) {
config->single_scratchpad = atoi(value);
} else if (strcmp(key, "xwayland_persistence") == 0) {
config->xwayland_persistence = atoi(value);
} else if (strcmp(key, "xwayland_render_unfocused") == 0) {
config->xwayland_render_unfocused = atoi(value);
} else if (strcmp(key, "syncobj_enable") == 0) {
config->syncobj_enable = atoi(value);
} else if (strcmp(key, "drag_tile_refresh_interval") == 0) {
@ -3157,6 +3160,7 @@ void override_config(void) {
config.overviewgappi = CLAMP_INT(config.overviewgappi, 0, 1000);
config.overviewgappo = CLAMP_INT(config.overviewgappo, 0, 1000);
config.xwayland_persistence = CLAMP_INT(config.xwayland_persistence, 0, 1);
config.xwayland_render_unfocused = CLAMP_INT(config.xwayland_render_unfocused, 0, 1);
config.syncobj_enable = CLAMP_INT(config.syncobj_enable, 0, 1);
config.drag_tile_refresh_interval =
CLAMP_FLOAT(config.drag_tile_refresh_interval, 1.0f, 16.0f);
@ -3314,6 +3318,7 @@ void set_value_default() {
config.view_current_to_back = 0;
config.single_scratchpad = 1;
config.xwayland_persistence = 1;
config.xwayland_render_unfocused = 1;
config.syncobj_enable = 0;
config.drag_tile_refresh_interval = 8.0f;
config.drag_floating_refresh_interval = 8.0f;