mirror of
https://github.com/labwc/labwc.git
synced 2026-04-08 08:21:09 -04:00
desktop.c: don't print errors when cursor is on resize-indicator
In f347a81, I thought there are only window contents and SSD under
`view->scene_tree` and forgot about the resize-indicator.
I also refactored the logic around it:
- Remove `ret.node->type == WLR_SCENE_NODE_BUFFER` check since it's
already done by `lab_wlr_surface_from_node()`
- Eliminate duplicated call to `lab_wlr_surface_from_node()`
This commit is contained in:
parent
d2ce31fcc9
commit
5969af1de7
1 changed files with 4 additions and 5 deletions
|
|
@ -303,13 +303,12 @@ get_cursor_context(struct server *server)
|
||||||
case LAB_NODE_VIEW:
|
case LAB_NODE_VIEW:
|
||||||
case LAB_NODE_XDG_POPUP:
|
case LAB_NODE_XDG_POPUP:
|
||||||
ret.view = desc->view;
|
ret.view = desc->view;
|
||||||
if (ret.node->type == WLR_SCENE_NODE_BUFFER
|
|
||||||
&& lab_wlr_surface_from_node(ret.node)) {
|
|
||||||
ret.type = LAB_NODE_CLIENT;
|
|
||||||
ret.surface = lab_wlr_surface_from_node(ret.node);
|
ret.surface = lab_wlr_surface_from_node(ret.node);
|
||||||
|
if (ret.surface) {
|
||||||
|
ret.type = LAB_NODE_CLIENT;
|
||||||
} else {
|
} else {
|
||||||
/* should never be reached */
|
/* e.g. when cursor is on resize-indicator */
|
||||||
wlr_log(WLR_ERROR, "cursor not on client or ssd");
|
ret.type = LAB_NODE_NONE;
|
||||||
}
|
}
|
||||||
return ret;
|
return ret;
|
||||||
case LAB_NODE_LAYER_SURFACE:
|
case LAB_NODE_LAYER_SURFACE:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue