mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-11-10 13:07:26 +01:00
devicescale: Bug fix: need to parse XDG_CURRENT_DESKTOP for GNOME classic
This commit is contained in:
parent
70f9fee8af
commit
738d23cf51
@ -23,6 +23,7 @@ import (
|
|||||||
"os/exec"
|
"os/exec"
|
||||||
"regexp"
|
"regexp"
|
||||||
"strconv"
|
"strconv"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
type windowManager int
|
type windowManager int
|
||||||
@ -34,7 +35,8 @@ const (
|
|||||||
)
|
)
|
||||||
|
|
||||||
func currentWindowManager() windowManager {
|
func currentWindowManager() windowManager {
|
||||||
switch os.Getenv("XDG_CURRENT_DESKTOP") {
|
tokens := strings.Split(os.Getenv("XDG_CURRENT_DESKTOP"), ":")
|
||||||
|
switch tokens[len(tokens)-1] {
|
||||||
case "GNOME":
|
case "GNOME":
|
||||||
return windowManagerGnome
|
return windowManagerGnome
|
||||||
case "X-Cinnamon":
|
case "X-Cinnamon":
|
||||||
|
Loading…
Reference in New Issue
Block a user