[Libreoffice-bugs] [Bug 119881] get_desktop_environment() doesn't work correctly if $XDG_CURRENT_DESKTOP contains a colon-separated list of strings

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Fri Sep 14 15:24:44 UTC 2018


https://bugs.documentfoundation.org/show_bug.cgi?id=119881

--- Comment #5 from Olivier Tilloy <olivier.tilloy at canonical.com> ---
Hi Xisco,

Without researching this further, I think what needs to happen is splitting the
value of aCurrentDesktop on colons, and iterate until we find a known DE.

In pseudo-code:

  array aCurrentDesktops = aCurrentDesktop.split(":")
  for (de in aCurrentDesktops) {
    if (de.equalsIgnoreAsciiCase("unity")) {
      ret = DESKTOP_UNITY;
      break;
    } else if (de.equalsIgnoreAsciiCase("gnome")) {
      ret = DESKTOP_GNOME;
      break;
    } else if …
  }

I can give it a try next week if you don't beat me to it.

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20180914/e2688150/attachment.html>


More information about the Libreoffice-bugs mailing list