mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 21:05:58 +01:00
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).
This commit is contained in:
parent
de56ea6b1e
commit
4f66565606
1 changed files with 11 additions and 14 deletions
|
@ -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,
|
static struct roots_view *desktop_view_at(struct roots_desktop *desktop,
|
||||||
double lx, double ly, struct wlr_surface **surface,
|
double lx, double ly, struct wlr_surface **surface,
|
||||||
double *sx, double *sy) {
|
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;
|
struct roots_view *view;
|
||||||
wl_list_for_each(view, &desktop->views, link) {
|
wl_list_for_each(view, &desktop->views, link) {
|
||||||
if (view_at(view, lx, ly, surface, sx, sy)) {
|
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))) {
|
ox, oy, sx, sy))) {
|
||||||
return surface;
|
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,
|
if ((surface = layer_surface_at(roots_output,
|
||||||
&roots_output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
|
&roots_output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
|
||||||
ox, oy, sx, sy))) {
|
ox, oy, sx, sy))) {
|
||||||
|
|
Loading…
Reference in a new issue