mirror of
https://github.com/labwc/labwc.git
synced 2026-02-17 22:05:30 -05:00
src/ssd: Convert button node descriptors to struct ssd_button
This allows for way easier button hover detection and future features like toggling rounded corner buttons on maximize.
This commit is contained in:
parent
f1ada7e407
commit
ca9226a7a6
8 changed files with 103 additions and 74 deletions
|
|
@ -296,8 +296,10 @@ desktop_node_and_view_at(struct server *server, double lx, double ly,
|
|||
}
|
||||
if (desc->type == LAB_NODE_DESC_SSD_BUTTON) {
|
||||
/* Always return the top scene node for SSD buttons */
|
||||
struct ssd_button *button = node_ssd_button_from_node(node);
|
||||
*scene_node = node;
|
||||
goto has_view_data;
|
||||
*view_area = button->type;
|
||||
return button->view;
|
||||
}
|
||||
if (desc->type == LAB_NODE_DESC_LAYER_SURFACE) {
|
||||
/* FIXME: we shouldn't have to set *view_area */
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue