idleMilliseconds: return -1 if WAYLAND_DISPLAY set
CppUtils.idleMilliseconds(): If the WAYLAND_DISPLAY environment variable is set, assume we're running under a Wayland environment and return early before trying to connect to an X11 display.
This commit is contained in:
parent
acce5d60ae
commit
9ef13c9d50
|
@ -62,6 +62,8 @@ public slots:
|
|||
return -1;
|
||||
|
||||
#elif defined(USE_LINUX_AUTOAWAY)
|
||||
if (! this->waylandDisplay.isEmpty()) return -1;
|
||||
|
||||
Display *display = XOpenDisplay(NULL);
|
||||
if (! display) return -1;
|
||||
|
||||
|
@ -88,6 +90,7 @@ public slots:
|
|||
|
||||
private:
|
||||
QLocale appLocale;
|
||||
QString waylandDisplay = qEnvironmentVariable("WAYLAND_DISPLAY");
|
||||
};
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user