mirror of
https://github.com/labwc/labwc.git
synced 2025-10-29 05:40:24 -04:00
mousebind: support Border context
This new context includes `Top`...`BRCorner` and makes it easier to modify the mousebinds bound to them.
This commit is contained in:
parent
b5b257092d
commit
02be24bf59
6 changed files with 10 additions and 72 deletions
|
|
@ -132,6 +132,8 @@ context_from_str(const char *str)
|
|||
return LAB_SSD_PART_CORNER_BOTTOM_RIGHT;
|
||||
} else if (!strcasecmp(str, "BLCorner")) {
|
||||
return LAB_SSD_PART_CORNER_BOTTOM_LEFT;
|
||||
} else if (!strcasecmp(str, "Border")) {
|
||||
return LAB_SSD_PART_BORDER;
|
||||
} else if (!strcasecmp(str, "Top")) {
|
||||
return LAB_SSD_PART_TOP;
|
||||
} else if (!strcasecmp(str, "Right")) {
|
||||
|
|
|
|||
|
|
@ -328,6 +328,10 @@ ssd_part_contains(enum ssd_part_type whole, enum ssd_part_type candidate)
|
|||
return candidate >= LAB_SSD_BUTTON_CLOSE
|
||||
&& candidate <= LAB_SSD_CLIENT;
|
||||
}
|
||||
if (whole == LAB_SSD_PART_BORDER) {
|
||||
return candidate >= LAB_SSD_PART_CORNER_TOP_LEFT
|
||||
&& candidate <= LAB_SSD_PART_LEFT;
|
||||
}
|
||||
if (whole == LAB_SSD_PART_TOP) {
|
||||
return candidate == LAB_SSD_PART_CORNER_TOP_LEFT
|
||||
|| candidate == LAB_SSD_PART_CORNER_TOP_RIGHT;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue