mirror of
https://gitlab.freedesktop.org/wlroots/wlroots.git
synced 2024-11-22 15:12:26 +00:00
rootston: Let layer_surface_at look at popups
This allows them to receive input as well.
This commit is contained in:
parent
d1e82a8ede
commit
d4cb33c9fc
@ -641,11 +641,24 @@ static struct wlr_surface *layer_surface_at(struct roots_output *output,
|
|||||||
struct wl_list *layer, double ox, double oy, double *sx, double *sy) {
|
struct wl_list *layer, double ox, double oy, double *sx, double *sy) {
|
||||||
struct roots_layer_surface *roots_surface;
|
struct roots_layer_surface *roots_surface;
|
||||||
wl_list_for_each_reverse(roots_surface, layer, link) {
|
wl_list_for_each_reverse(roots_surface, layer, link) {
|
||||||
struct wlr_surface *wlr_surface =
|
struct wlr_surface *wlr_surface;
|
||||||
roots_surface->layer_surface->surface;
|
double _sx, _sy;
|
||||||
double _sx = ox - roots_surface->geo.x;
|
struct wlr_xdg_popup *popup;
|
||||||
double _sy = oy - roots_surface->geo.y;
|
wl_list_for_each(popup, &roots_surface->layer_surface->popups, link) {
|
||||||
// TODO: Test popups/subsurfaces
|
wlr_surface = popup->base->surface;
|
||||||
|
_sx = ox - roots_surface->geo.x - popup->geometry.x;
|
||||||
|
_sy = oy - roots_surface->geo.y - popup->geometry.y;
|
||||||
|
if (wlr_surface_point_accepts_input(wlr_surface, _sx, _sy)) {
|
||||||
|
*sx = _sx;
|
||||||
|
*sy = _sy;
|
||||||
|
return wlr_surface;
|
||||||
|
}
|
||||||
|
// TODO: popups can have popups
|
||||||
|
}
|
||||||
|
// TODO: Test subsurfaces
|
||||||
|
wlr_surface = roots_surface->layer_surface->surface;
|
||||||
|
_sx = ox - roots_surface->geo.x;
|
||||||
|
_sy = oy - roots_surface->geo.y;
|
||||||
if (wlr_surface_point_accepts_input(wlr_surface, _sx, _sy)) {
|
if (wlr_surface_point_accepts_input(wlr_surface, _sx, _sy)) {
|
||||||
*sx = _sx;
|
*sx = _sx;
|
||||||
*sy = _sy;
|
*sy = _sy;
|
||||||
|
Loading…
Reference in New Issue
Block a user