aboutsummaryrefslogtreecommitdiffstats
path: root/sway/input/cursor.c
diff options
context:
space:
mode:
authorLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-04-18 13:06:10 +1000
committerLibravatar Ryan Dwyer <ryandwyer1@gmail.com>2018-04-18 13:06:10 +1000
commit8d06b222f048e5a27c4c5b0bc46ceaab7639502f (patch)
treef75d4225aef33dadae0a8d60ab98cdef343ccb62 /sway/input/cursor.c
parentMore fullscreen fixes. (diff)
downloadsway-8d06b222f048e5a27c4c5b0bc46ceaab7639502f.tar.gz
sway-8d06b222f048e5a27c4c5b0bc46ceaab7639502f.tar.zst
sway-8d06b222f048e5a27c4c5b0bc46ceaab7639502f.zip
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.
Diffstat (limited to 'sway/input/cursor.c')
-rw-r--r--sway/input/cursor.c17
1 files changed, 10 insertions, 7 deletions
diff --git a/sway/input/cursor.c b/sway/input/cursor.c
index 6d14c12c..a19f0752 100644
--- a/sway/input/cursor.c
+++ b/sway/input/cursor.c
@@ -84,19 +84,22 @@ static struct sway_container *container_at_cursor(struct sway_cursor *cursor,
84 ox, oy, sx, sy))) { 84 ox, oy, sx, sy))) {
85 return ws; 85 return ws;
86 } 86 }
87 if (ws->sway_workspace->fullscreen) {
88 struct wlr_surface *wlr_surface = ws->sway_workspace->fullscreen->surface;
89 if (wlr_surface_point_accepts_input(wlr_surface, ox, oy)) {
90 *sx = ox;
91 *sy = oy;
92 *surface = wlr_surface;
93 return ws->sway_workspace->fullscreen->swayc;
94 }
95 return NULL;
96 }
87 if ((*surface = layer_surface_at(output, 97 if ((*surface = layer_surface_at(output,
88 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP], 98 &output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
89 ox, oy, sx, sy))) { 99 ox, oy, sx, sy))) {
90 return ws; 100 return ws;
91 } 101 }
92 102
93 if (ws->sway_workspace->fullscreen) {
94 *sx = ox;
95 *sy = oy;
96 *surface = ws->sway_workspace->fullscreen->surface;
97 return ws->sway_workspace->fullscreen->swayc;
98 }
99
100 struct sway_container *c; 103 struct sway_container *c;
101 if ((c = container_at(ws, cursor->cursor->x, cursor->cursor->y, 104 if ((c = container_at(ws, cursor->cursor->x, cursor->cursor->y,
102 surface, sx, sy))) { 105 surface, sx, sy))) {