| 2 | | |
| 3 | | {{{ |
| 4 | | fbatschu@minibox:~$ diff -c display-svga-x11.cpp.orig display-svga-x11.cpp |
| 5 | | *** display-svga-x11.cpp.orig 2020-05-18 17:50:13.013704770 +0200 |
| 6 | | --- display-svga-x11.cpp 2020-05-18 18:34:57.231535635 +0200 |
| 7 | | *************** |
| 8 | | *** 658,671 **** |
| 9 | | */ |
| 10 | | static bool isX11() |
| 11 | | { |
| 12 | | ! char* pSessionType; |
| 13 | | ! pSessionType = getenv("XDG_SESSION_TYPE"); |
| 14 | | ! if (pSessionType != NULL) |
| 15 | | ! { |
| 16 | | ! if (RTStrIStartsWith(pSessionType, "x11")) |
| 17 | | ! return true; |
| 18 | | } |
| 19 | | ! return false; |
| 20 | | } |
| 21 | | |
| 22 | | static bool init() |
| 23 | | --- 658,673 ---- |
| 24 | | */ |
| 25 | | static bool isX11() |
| 26 | | { |
| 27 | | ! const char *const pSessionType = getenv("XDG_SESSION_TYPE"); |
| 28 | | ! const char *pDisplayType; |
| 29 | | ! |
| 30 | | ! if ((pSessionType != NULL) && (RTStrIStartsWith(pSessionType, "wayland")) { |
| 31 | | ! return false; |
| 32 | | ! } |
| 33 | | ! if ((pDisplayType = getenv("WAYLAND_DISPLAY")) != NULL) { |
| 34 | | ! return false; |
| 35 | | } |
| 36 | | ! return true; |
| 37 | | } |
| 38 | | |
| 39 | | static bool init() |
| 40 | | }}} |