mirror of
https://github.com/swaywm/sway.git
synced 2024-11-26 18:01:29 +00:00
More fullscreen fixes.
* Render fullscreen views without wlr function, which makes popups and lockscreen work. * Don't allow input events to surfaces behind fullscreen views. * Use correct output dimensions (for rotated outputs).
This commit is contained in:
parent
72beae209b
commit
35ccdd67a8
|
@ -229,7 +229,11 @@ static void render_container_iterator(struct sway_container *con,
|
||||||
|
|
||||||
static void render_container(struct sway_output *output,
|
static void render_container(struct sway_output *output,
|
||||||
struct sway_container *con) {
|
struct sway_container *con) {
|
||||||
container_descendants(con, C_VIEW, render_container_iterator, output);
|
if (con->type == C_VIEW) { // Happens if a view is fullscreened
|
||||||
|
render_container_iterator(con, output);
|
||||||
|
} else {
|
||||||
|
container_descendants(con, C_VIEW, render_container_iterator, output);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
static struct sway_container *output_get_active_workspace(
|
static struct sway_container *output_get_active_workspace(
|
||||||
|
@ -277,10 +281,8 @@ 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);
|
||||||
|
|
||||||
if (workspace->sway_workspace->fullscreen) {
|
if (workspace->sway_workspace->fullscreen) {
|
||||||
wlr_output_set_fullscreen_surface(wlr_output,
|
render_container(output, workspace->sway_workspace->fullscreen->swayc);
|
||||||
workspace->sway_workspace->fullscreen->surface);
|
|
||||||
} else {
|
} else {
|
||||||
wlr_output_set_fullscreen_surface(wlr_output, NULL);
|
|
||||||
render_layer(output,
|
render_layer(output,
|
||||||
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND]);
|
&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]);
|
||||||
|
|
|
@ -12,6 +12,7 @@
|
||||||
#include "sway/layers.h"
|
#include "sway/layers.h"
|
||||||
#include "sway/output.h"
|
#include "sway/output.h"
|
||||||
#include "sway/tree/view.h"
|
#include "sway/tree/view.h"
|
||||||
|
#include "sway/tree/workspace.h"
|
||||||
#include "wlr-layer-shell-unstable-v1-protocol.h"
|
#include "wlr-layer-shell-unstable-v1-protocol.h"
|
||||||
|
|
||||||
static struct wlr_surface *layer_surface_at(struct sway_output *output,
|
static struct wlr_surface *layer_surface_at(struct sway_output *output,
|
||||||
|
@ -89,6 +90,13 @@ static struct sway_container *container_at_cursor(struct sway_cursor *cursor,
|
||||||
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))) {
|
||||||
|
|
|
@ -598,10 +598,8 @@ void arrange_windows(struct sway_container *container,
|
||||||
|
|
||||||
if (container->type == C_WORKSPACE
|
if (container->type == C_WORKSPACE
|
||||||
&& container->sway_workspace->fullscreen) {
|
&& container->sway_workspace->fullscreen) {
|
||||||
struct wlr_output *wlr_output
|
|
||||||
= container->parent->sway_output->wlr_output;
|
|
||||||
view_configure(container->sway_workspace->fullscreen, 0, 0,
|
view_configure(container->sway_workspace->fullscreen, 0, 0,
|
||||||
wlr_output->width, wlr_output->height);
|
container->parent->width, container->parent->height);
|
||||||
}
|
}
|
||||||
|
|
||||||
double x = 0, y = 0;
|
double x = 0, y = 0;
|
||||||
|
|
Loading…
Reference in a new issue