Add All context for mouse events

This commit is contained in:
Simon Long 2024-05-01 07:28:17 +01:00 committed by Johan Malm
parent ecb7267686
commit ed1b631492
3 changed files with 4 additions and 1 deletions

View file

@ -142,6 +142,8 @@ context_from_str(const char *str)
return LAB_SSD_ROOT;
} else if (!strcasecmp(str, "Root")) {
return LAB_SSD_ROOT;
} else if (!strcasecmp(str, "All")) {
return LAB_SSD_ALL;
}
wlr_log(WLR_ERROR, "unknown mouse context (%s)", str);
return LAB_SSD_NONE;

View file

@ -310,7 +310,7 @@ ssd_destroy(struct ssd *ssd)
bool
ssd_part_contains(enum ssd_part_type whole, enum ssd_part_type candidate)
{
if (whole == candidate) {
if (whole == candidate || whole == LAB_SSD_ALL) {
return true;
}
if (whole == LAB_SSD_PART_TITLEBAR) {