From 3bc8b3e24ad0e2dd14515d58060633c7f0142389 Mon Sep 17 00:00:00 2001 From: KockaAdmiralac <1405223@gmail.com> Date: Sun, 29 Apr 2018 22:44:42 +0200 Subject: [PATCH] DE detection fix --- src/oneshot.cpp | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/src/oneshot.cpp b/src/oneshot.cpp index ff4dd69..53727a9 100644 --- a/src/oneshot.cpp +++ b/src/oneshot.cpp @@ -69,9 +69,6 @@ struct OneshotPrivate bool winPosChanged; std::vector obscuredMap; bool obscuredCleared; -#if defined OS_LINUX - std::string desktopEnv; -#endif OneshotPrivate() : window(0), @@ -282,10 +279,10 @@ Oneshot::Oneshot(RGSSThreadData &threadData) : desktop.find("gnome") != std::string::npos || desktop.find("unity") != std::string::npos ) { - p->desktopEnv = "gnome"; + desktopEnv = "gnome"; gtk_init(0, 0); } else if (desktop.find("xfce") != std::string::npos) { - p->desktopEnv = "xfce"; + desktopEnv = "xfce"; } #endif @@ -458,7 +455,7 @@ bool Oneshot::msgbox(int type, const char *body, const char *title) if (!title) title = ""; #if defined OS_LINUX - if (p->desktopEnv == "gnome") { + if (desktopEnv == "gnome") { linux_DialogData data = {type, body, title, 0}; gdk_threads_add_idle(linux_dialog, &data); gtk_main();