Implement cursor input for overlay popups

This commit is contained in:
Consolatis 2022-02-24 21:01:37 +01:00 committed by Johan Malm
parent ce38d2dbd6
commit 1d9c9d1afc

View file

@ -358,6 +358,14 @@ desktop_surface_and_view_at(struct server *server, double lx, double ly,
wlr_output_layout_output_coords(output->server->output_layout,
wlr_output, &ox, &oy);
/* Overlay-layer popups */
*surface = layer_surface_popup_at(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
ox, oy, sx, sy);
if (*surface) {
return NULL;
}
/* Overlay-layer */
*surface = layer_surface_at(
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
@ -366,6 +374,26 @@ desktop_surface_and_view_at(struct server *server, double lx, double ly,
return NULL;
}
/* Check for other layer popups */
*surface = layer_surface_popup_at(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
ox, oy, sx, sy);
if (*surface) {
return NULL;
}
*surface = layer_surface_popup_at(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
ox, oy, sx, sy);
if (*surface) {
return NULL;
}
*surface = layer_surface_popup_at(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
ox, oy, sx, sy);
if (*surface) {
return NULL;
}
/* Check for unmanaged surfaces */
#if HAVE_XWAYLAND
struct xwayland_unmanaged *unmanaged_surface;
@ -382,26 +410,6 @@ desktop_surface_and_view_at(struct server *server, double lx, double ly,
}
#endif
/* Check all layer popups */
*surface = layer_surface_popup_at(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
ox, oy, sx, sy);
if (*surface) {
return NULL;
}
*surface = layer_surface_popup_at(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
ox, oy, sx, sy);
if (*surface) {
return NULL;
}
*surface = layer_surface_popup_at(output,
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BACKGROUND],
ox, oy, sx, sy);
if (*surface) {
return NULL;
}
/* Top-layer */
*surface = layer_surface_at(
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
@ -410,6 +418,7 @@ desktop_surface_and_view_at(struct server *server, double lx, double ly,
return NULL;
}
/* Usual views */
struct view *view;
wl_list_for_each (view, &server->views, link) {
if (!view->mapped) {
@ -432,6 +441,7 @@ desktop_surface_and_view_at(struct server *server, double lx, double ly,
}
}
/* Bottom and Background layers */
*surface = layer_surface_at(
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
ox, oy, sx, sy);