mirror of
https://github.com/hyprwm/wlroots-hyprland.git
synced 2024-11-22 12:55:58 +01:00
scene: drop default case in wlr_scene_node_at
This allows the compiler to error out if we haven't enumerated all of the cases. This is useful to avoid a missing implementation when adding a new node type.
This commit is contained in:
parent
30d3c76817
commit
b25759cd20
1 changed files with 3 additions and 2 deletions
|
@ -446,6 +446,9 @@ struct wlr_scene_node *wlr_scene_node_at(struct wlr_scene_node *node,
|
|||
}
|
||||
|
||||
switch (node->type) {
|
||||
case WLR_SCENE_NODE_ROOT:
|
||||
case WLR_SCENE_NODE_TREE:
|
||||
break;
|
||||
case WLR_SCENE_NODE_SURFACE:;
|
||||
struct wlr_scene_surface *scene_surface = wlr_scene_surface_from_node(node);
|
||||
if (wlr_surface_point_accepts_input(scene_surface->surface, lx, ly)) {
|
||||
|
@ -470,8 +473,6 @@ struct wlr_scene_node *wlr_scene_node_at(struct wlr_scene_node *node,
|
|||
return &rect->node;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
return NULL;
|
||||
|
|
Loading…
Reference in a new issue