Portal: sync capture to frame update

This commit is contained in:
dec05eba
2024-09-15 04:22:00 +02:00
parent f53d7b30b1
commit f6f8fdb33c
6 changed files with 53 additions and 11 deletions

View File

@@ -130,8 +130,10 @@ bool gsr_damage_set_target_monitor(gsr_damage *self, const char *monitor_name) {
}
memset(&self->monitor, 0, sizeof(self->monitor));
if(!get_monitor_by_name(self->egl, GSR_CONNECTION_X11, monitor_name, &self->monitor))
fprintf(stderr, "gsr warning: gsr_damage_set_target_monitor: failed to find monitor: %s\n", monitor_name);
if(strcmp(monitor_name, "screen") != 0 && strcmp(monitor_name, "screen-direct") != 0 && strcmp(monitor_name, "screen-direct-force") != 0) {
if(!get_monitor_by_name(self->egl, GSR_CONNECTION_X11, monitor_name, &self->monitor))
fprintf(stderr, "gsr warning: gsr_damage_set_target_monitor: failed to find monitor: %s\n", monitor_name);
}
if(self->window)
XSelectInput(self->egl->x11.dpy, self->window, 0);