mirror of
https://github.com/labwc/labwc.git
synced 2026-03-14 05:33:52 -04:00
Implement cursor input for overlay popups
This commit is contained in:
parent
ce38d2dbd6
commit
1d9c9d1afc
1 changed files with 30 additions and 20 deletions
|
|
@ -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_layout_output_coords(output->server->output_layout,
|
||||||
wlr_output, &ox, &oy);
|
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 */
|
/* Overlay-layer */
|
||||||
*surface = layer_surface_at(
|
*surface = layer_surface_at(
|
||||||
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_OVERLAY],
|
&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;
|
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 */
|
/* Check for unmanaged surfaces */
|
||||||
#if HAVE_XWAYLAND
|
#if HAVE_XWAYLAND
|
||||||
struct xwayland_unmanaged *unmanaged_surface;
|
struct xwayland_unmanaged *unmanaged_surface;
|
||||||
|
|
@ -382,26 +410,6 @@ desktop_surface_and_view_at(struct server *server, double lx, double ly,
|
||||||
}
|
}
|
||||||
#endif
|
#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 */
|
/* Top-layer */
|
||||||
*surface = layer_surface_at(
|
*surface = layer_surface_at(
|
||||||
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_TOP],
|
&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;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Usual views */
|
||||||
struct view *view;
|
struct view *view;
|
||||||
wl_list_for_each (view, &server->views, link) {
|
wl_list_for_each (view, &server->views, link) {
|
||||||
if (!view->mapped) {
|
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(
|
*surface = layer_surface_at(
|
||||||
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
|
&output->layers[ZWLR_LAYER_SHELL_V1_LAYER_BOTTOM],
|
||||||
ox, oy, sx, sy);
|
ox, oy, sx, sy);
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue