shell: Make input capture optional for curtains
desktop-shell's focus surfaces want to reuse this, but they don't want to capture the input, instead allowing it to fall through. Signed-off-by: Daniel Stone <daniels@collabora.com>
This commit is contained in:
parent
64ef87554b
commit
bd9b0676dd
|
@ -2092,6 +2092,7 @@ shell_ensure_fullscreen_black_view(struct shell_surface *shsurf)
|
|||
.surface_committed = black_surface_committed,
|
||||
.get_label = black_surface_get_label,
|
||||
.surface_private = shsurf->view,
|
||||
.capture_input = true,
|
||||
};
|
||||
|
||||
assert(weston_desktop_surface_get_fullscreen(shsurf->desktop_surface));
|
||||
|
|
|
@ -508,6 +508,8 @@ kiosk_shell_output_recreate_background(struct kiosk_shell_output *shoutput)
|
|||
curtain_params.width = output->width;
|
||||
curtain_params.height = output->height;
|
||||
|
||||
curtain_params.capture_input = true;
|
||||
|
||||
curtain_params.get_label = kiosk_shell_background_surface_get_label;
|
||||
curtain_params.surface_committed = NULL;
|
||||
curtain_params.surface_private = NULL;
|
||||
|
|
|
@ -173,8 +173,12 @@ weston_curtain_create(struct weston_compositor *compositor,
|
|||
}
|
||||
|
||||
pixman_region32_fini(&surface->input);
|
||||
pixman_region32_init_rect(&surface->input, 0, 0,
|
||||
params->width, params->height);
|
||||
if (params->capture_input) {
|
||||
pixman_region32_init_rect(&surface->input, 0, 0,
|
||||
params->width, params->height);
|
||||
} else {
|
||||
pixman_region32_init(&surface->input);
|
||||
}
|
||||
|
||||
weston_surface_set_size(surface, params->width, params->height);
|
||||
weston_view_set_position(view, params->x, params->y);
|
||||
|
|
|
@ -33,6 +33,7 @@ struct weston_curtain_params {
|
|||
void *surface_private;
|
||||
float r, g, b, a;
|
||||
int x, y, width, height;
|
||||
bool capture_input;
|
||||
};
|
||||
|
||||
struct weston_output *
|
||||
|
|
Loading…
Reference in New Issue