Fullscreen rendering and input fixes.

* Render background when using fullscreen, because transparency.
* Check that fullscreen surface allows input.
* Don't look for surfaces in top layer if there's a fullscreen view.
master
Ryan Dwyer 7 years ago
parent 35ccdd67a8
commit 8d06b222f0

@ -280,11 +280,11 @@ static void render_output(struct sway_output *output, struct timespec *when,
struct sway_container *workspace = output_get_active_workspace(output); struct sway_container *workspace = output_get_active_workspace(output);
render_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
if (workspace->sway_workspace->fullscreen) { if (workspace->sway_workspace->fullscreen) {
render_container(output, workspace->sway_workspace->fullscreen->swayc); render_container(output, workspace->sway_workspace->fullscreen->swayc);
} else { } else {
render_layer(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
render_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]); render_layer(output, &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM]);
render_container(output, workspace); render_container(output, workspace);

@ -84,19 +84,22 @@ static struct sway_container *container_at_cursor(struct sway_cursor *cursor,
ox, oy, sx, sy))) { ox, oy, sx, sy))) {
return ws; return ws;
} }
if (ws->sway_workspace->fullscreen) {
struct wlr_surface *wlr_surface = ws->sway_workspace->fullscreen->surface;
if (wlr_surface_point_accepts_input(wlr_surface, ox, oy)) {
*sx = ox;
*sy = oy;
*surface = wlr_surface;
return ws->sway_workspace->fullscreen->swayc;
}
return NULL;
}
if ((*surface = layer_surface_at(output, if ((*surface = layer_surface_at(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP], &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
ox, oy, sx, sy))) { ox, oy, sx, sy))) {
return ws; return ws;
} }
if (ws->sway_workspace->fullscreen) {
*sx = ox;
*sy = oy;
*surface = ws->sway_workspace->fullscreen->surface;
return ws->sway_workspace->fullscreen->swayc;
}
struct sway_container *c; struct sway_container *c;
if ((c = container_at(ws, cursor->cursor->x, cursor->cursor->y, if ((c = container_at(ws, cursor->cursor->x, cursor->cursor->y,
surface, sx, sy))) { surface, sx, sy))) {

Loading…
Cancel
Save