From: Simon Long Date: Wed, 1 May 2024 06:28:17 +0000 (+0100) Subject: Add All context for mouse events X-Git-Url: https://git.mdlowis.com/?a=commitdiff_plain;h=ed1b63149204b1dc403de8c1bcfbfd24313730ff;p=proto%2Flabwc.git Add All context for mouse events --- diff --git a/include/ssd.h b/include/ssd.h index 7ada9dba..a0c520c6 100644 --- a/include/ssd.h +++ b/include/ssd.h @@ -45,6 +45,7 @@ enum ssd_part_type { LAB_SSD_LAYER_SURFACE, LAB_SSD_LAYER_SUBSURFACE, LAB_SSD_UNMANAGED, + LAB_SSD_ALL, LAB_SSD_END_MARKER }; diff --git a/src/config/mousebind.c b/src/config/mousebind.c index a686010d..857012fd 100644 --- a/src/config/mousebind.c +++ b/src/config/mousebind.c @@ -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; diff --git a/src/ssd/ssd.c b/src/ssd/ssd.c index 724a8ba9..2d382ca0 100644 --- a/src/ssd/ssd.c +++ b/src/ssd/ssd.c @@ -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) {