aboutsummaryrefslogtreecommitdiff
path: root/rootston
diff options
context:
space:
mode:
authorSebastian Krzyszkowiak <dos@dosowisko.net>2019-02-22 04:03:29 +0100
committeremersion <contact@emersion.fr>2019-02-22 19:13:57 +0100
commit4f66565606c8958684c00f28d0b4996904c041bc (patch)
treea5d11f2438e74df7febe11238892f76ab7da7831 /rootston
parentde56ea6b1e3cfa41981fd4dd349b0eef852aee23 (diff)
rootston: surface_at: check for fullscreen surfaces in between TOP and OVERLAY layers
Input order didn't match rendering order, causing pointer events to go into surfaces that were completely obscured by others (like a LAYER_TOP panel behind a fullscreen window).
Diffstat (limited to 'rootston')
-rw-r--r--rootston/desktop.c25
1 files changed, 11 insertions, 14 deletions
diff --git a/rootston/desktop.c b/rootston/desktop.c
index 4cb85885..63ff1382 100644
--- a/rootston/desktop.c
+++ b/rootston/desktop.c
@@ -759,20 +759,6 @@ static bool view_at(struct roots_view *view, double lx, double ly,
static struct roots_view *desktop_view_at(struct roots_desktop *desktop,
double lx, double ly, struct wlr_surface **surface,
double *sx, double *sy) {
- struct wlr_output *wlr_output =
- wlr_output_layout_output_at(desktop->layout, lx, ly);
- if (wlr_output != NULL) {
- struct roots_output *output =
- desktop_output_from_wlr_output(desktop, wlr_output);
- if (output != NULL && output->fullscreen_view != NULL) {
- if (view_at(output->fullscreen_view, lx, ly, surface, sx, sy)) {
- return output->fullscreen_view;
- } else {
- return NULL;
- }
- }
- }
-
struct roots_view *view;
wl_list_for_each(view, &desktop->views, link) {
if (view_at(view, lx, ly, surface, sx, sy)) {
@@ -821,6 +807,17 @@ struct wlr_surface *desktop_surface_at(struct roots_desktop *desktop,
ox, oy, sx, sy))) {
return surface;
}
+
+ struct roots_output *output =
+ desktop_output_from_wlr_output(desktop, wlr_output);
+ if (output != NULL && output->fullscreen_view != NULL) {
+ if (view_at(output->fullscreen_view, lx, ly, &surface, sx, sy)) {
+ return surface;
+ } else {
+ return NULL;
+ }
+ }
+
if ((surface = layer_surface_at(roots_output,
&roots_output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
ox, oy, sx, sy))) {