mirror of
https://github.com/labwc/labwc.git
synced 2025-11-05 13:29:58 -05:00
define ssd_part_contains to define the mouse context subset relation
This commit is contained in:
parent
b008917895
commit
d84103d669
2 changed files with 16 additions and 0 deletions
15
src/ssd.c
15
src/ssd.c
|
|
@ -415,3 +415,18 @@ ssd_update_geometry(struct view *view, bool force)
|
|||
view->ssd.box.height = view->h;
|
||||
damage_all_outputs(view->server);
|
||||
}
|
||||
|
||||
bool
|
||||
ssd_part_contains(enum ssd_part_type whole, enum ssd_part_type candidate)
|
||||
{
|
||||
if (whole == candidate) {
|
||||
return true;
|
||||
}
|
||||
if (whole == LAB_SSD_PART_TITLEBAR) {
|
||||
return candidate >= LAB_SSD_BUTTON_CLOSE && candidate <= LAB_SSD_PART_CORNER_TOP_RIGHT;
|
||||
}
|
||||
if (whole == LAB_SSD_FRAME) {
|
||||
return candidate >= LAB_SSD_BUTTON_CLOSE && candidate <= LAB_SSD_CLIENT;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue