|
|
@ -121,8 +121,10 @@ static void view_for_each_surface(struct roots_view *view,
|
|
|
|
view->y, view->rotation, false, iterator, user_data);
|
|
|
|
view->y, view->rotation, false, iterator, user_data);
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
case ROOTS_XWAYLAND_VIEW:
|
|
|
|
case ROOTS_XWAYLAND_VIEW:
|
|
|
|
surface_for_each_surface(view->wlr_surface, view->x, view->y,
|
|
|
|
if (view->wlr_surface != NULL) {
|
|
|
|
view->rotation, iterator, user_data);
|
|
|
|
surface_for_each_surface(view->wlr_surface, view->x, view->y,
|
|
|
|
|
|
|
|
view->rotation, iterator, user_data);
|
|
|
|
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -466,6 +468,28 @@ static void output_damage_whole(struct roots_output *output) {
|
|
|
|
schedule_render(output);
|
|
|
|
schedule_render(output);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
static bool view_accept_damage(struct roots_output *output,
|
|
|
|
|
|
|
|
struct roots_view *view) {
|
|
|
|
|
|
|
|
if (output->fullscreen_view == NULL) {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (output->fullscreen_view == view) {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (output->fullscreen_view->type == ROOTS_XWAYLAND_VIEW &&
|
|
|
|
|
|
|
|
view->type == ROOTS_XWAYLAND_VIEW) {
|
|
|
|
|
|
|
|
// Special case: accept damage from children
|
|
|
|
|
|
|
|
struct wlr_xwayland_surface *xsurface = view->xwayland_surface;
|
|
|
|
|
|
|
|
while (xsurface != NULL) {
|
|
|
|
|
|
|
|
if (output->fullscreen_view->xwayland_surface == xsurface) {
|
|
|
|
|
|
|
|
return true;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
xsurface = xsurface->parent;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
return false;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
static void damage_whole_surface(struct wlr_surface *surface,
|
|
|
|
static void damage_whole_surface(struct wlr_surface *surface,
|
|
|
|
double lx, double ly, float rotation, void *data) {
|
|
|
|
double lx, double ly, float rotation, void *data) {
|
|
|
|
struct roots_output *output = data;
|
|
|
|
struct roots_output *output = data;
|
|
|
@ -489,7 +513,7 @@ static void damage_whole_surface(struct wlr_surface *surface,
|
|
|
|
|
|
|
|
|
|
|
|
void output_damage_whole_view(struct roots_output *output,
|
|
|
|
void output_damage_whole_view(struct roots_output *output,
|
|
|
|
struct roots_view *view) {
|
|
|
|
struct roots_view *view) {
|
|
|
|
if (output->fullscreen_view != NULL && output->fullscreen_view != view) {
|
|
|
|
if (!view_accept_damage(output, view)) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -524,7 +548,7 @@ static void damage_from_surface(struct wlr_surface *surface,
|
|
|
|
|
|
|
|
|
|
|
|
void output_damage_from_view(struct roots_output *output,
|
|
|
|
void output_damage_from_view(struct roots_output *output,
|
|
|
|
struct roots_view *view) {
|
|
|
|
struct roots_view *view) {
|
|
|
|
if (output->fullscreen_view != NULL && output->fullscreen_view != view) {
|
|
|
|
if (!view_accept_damage(output, view)) {
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|