diff --git a/src/conio/x_events.c b/src/conio/x_events.c index 6c209ae076d35c15e4d256cc72b18516daba20c6..77239ff1a68a952cb4090bb6a92480e775f86142 100644 --- a/src/conio/x_events.c +++ b/src/conio/x_events.c @@ -327,6 +327,7 @@ initialize_atoms(void) Atom atom; struct AtomDef *ad; long offset; + const char *evar; supported_standards |= (1 << UTF8_ATOM); supported_standards |= (1 << ICCCM_ATOM); @@ -424,10 +425,15 @@ initialize_atoms(void) } /* - * ChromeOS doesn't do anything reasonable with PRIMARY... - * Hack in use of CLIPBOARD instead. + * Wayland sucks, use CLIPBOARD instead of PRIMARY + * This will annoy users in Wayland environments where + * PRIMARY is properly supported (apparently GNOME) + * but GNOME is why I'm not writing a Wayland bakend + * right now anyway (no server-side decorations) so + * they can suck it. */ - if (wm_wm_name != NULL && strcmp(wm_wm_name, "Sommelier") == 0) { + evar = getenv("XDG_SESSION_TYPE"); + if (evar && strcmp(evar, "wayland")) { if (A(CLIPBOARD) != None) copy_paste_selection = A(CLIPBOARD); }