|
|
@ -654,3 +654,33 @@ struct wlr_surface *wlr_layer_surface_v1_popup_surface_at(
|
|
|
|
|
|
|
|
|
|
|
|
return NULL;
|
|
|
|
return NULL;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
enum wlr_edges wlr_layer_surface_v1_get_exclusive_edge(struct wlr_layer_surface_v1 *surface) {
|
|
|
|
|
|
|
|
if (surface->current.exclusive_zone <= 0) {
|
|
|
|
|
|
|
|
return WLR_EDGE_NONE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
uint32_t anchor = surface->current.anchor;
|
|
|
|
|
|
|
|
if (surface->current.exclusive_edge != 0) {
|
|
|
|
|
|
|
|
anchor = surface->current.exclusive_edge;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
switch (anchor) {
|
|
|
|
|
|
|
|
case ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP:
|
|
|
|
|
|
|
|
case ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT |
|
|
|
|
|
|
|
|
ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP:
|
|
|
|
|
|
|
|
return WLR_EDGE_TOP;
|
|
|
|
|
|
|
|
case ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM:
|
|
|
|
|
|
|
|
case ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT | ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT |
|
|
|
|
|
|
|
|
ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM:
|
|
|
|
|
|
|
|
return WLR_EDGE_BOTTOM;
|
|
|
|
|
|
|
|
case ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT:
|
|
|
|
|
|
|
|
case ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
|
|
|
|
|
|
|
|
ZWLR_LAYER_SURFACE_V1_ANCHOR_LEFT:
|
|
|
|
|
|
|
|
return WLR_EDGE_LEFT;
|
|
|
|
|
|
|
|
case ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT:
|
|
|
|
|
|
|
|
case ZWLR_LAYER_SURFACE_V1_ANCHOR_TOP | ZWLR_LAYER_SURFACE_V1_ANCHOR_BOTTOM |
|
|
|
|
|
|
|
|
ZWLR_LAYER_SURFACE_V1_ANCHOR_RIGHT:
|
|
|
|
|
|
|
|
return WLR_EDGE_RIGHT;
|
|
|
|
|
|
|
|
default:
|
|
|
|
|
|
|
|
return WLR_EDGE_NONE;
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|
|
|
|