patch 9.1.1495: Wayland: uses $XDG_SEAT to determine seat
Problem: Wayland: uses $XDG_SEAT to determine seat to use
(dr0bz, after v9.1.1485)
Solution: Do not try to determine the seat from $XDG_SEAT, remove the
code that checks for this environment variable (Foxe Chen).
related: https://github.com/vim/vim/issues/5157#issuecomment-3015248239
closes: #17625
Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/src/wayland.c b/src/wayland.c
index dc34925..3fef423 100644
--- a/src/wayland.c
+++ b/src/wayland.c
@@ -907,21 +907,14 @@
/*
* Return a seat with the give name/label. If none exists then NULL is returned.
- * If NULL or an empty string is passed as the label then $XDG_SEAT is used
- * else the first available seat found is used.
+ * If NULL or an empty string is passed as the label then the first available
+ * seat found is used.
*/
static vwl_seat_T *
vwl_get_seat(const char *label)
{
if ((STRCMP(label, "") == 0 || label == NULL) && vwl_seats.ga_len > 0)
- {
- const char *xdg_seat = (char*)mch_getenv("XDG_SEAT");
-
- if (xdg_seat == NULL)
return &((vwl_seat_T *)vwl_seats.ga_data)[0];
- else
- label = xdg_seat;
- }
for (int i = 0; i < vwl_seats.ga_len; i++)
{