mirror of
https://github.com/labwc/labwc.git
synced 2026-03-24 09:06:09 -04: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
|
|
@ -67,5 +67,6 @@ void ssd_update_title(struct view *view);
|
||||||
void ssd_create(struct view *view);
|
void ssd_create(struct view *view);
|
||||||
void ssd_destroy(struct view *view);
|
void ssd_destroy(struct view *view);
|
||||||
void ssd_update_geometry(struct view *view, bool force);
|
void ssd_update_geometry(struct view *view, bool force);
|
||||||
|
bool ssd_part_contains(enum ssd_part_type whole, enum ssd_part_type candidate);
|
||||||
|
|
||||||
#endif /* __LABWC_SSD_H */
|
#endif /* __LABWC_SSD_H */
|
||||||
|
|
|
||||||
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;
|
view->ssd.box.height = view->h;
|
||||||
damage_all_outputs(view->server);
|
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