summaryrefslogtreecommitdiff
path: root/src/utils/x11logger.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/utils/x11logger.cpp')
-rw-r--r--src/utils/x11logger.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/utils/x11logger.cpp b/src/utils/x11logger.cpp
index a61a940b7..dfccdd0bb 100644
--- a/src/utils/x11logger.cpp
+++ b/src/utils/x11logger.cpp
@@ -18,7 +18,6 @@
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
-#ifdef USE_SDL2
#ifdef USE_X11
#include "utils/x11logger.h"
@@ -46,7 +45,13 @@ bool X11Logger::logEvent(const SDL_Event &event)
return false;
std::string typeStr;
+#ifdef USE_SDL2
const int type = event.syswm.msg->msg.x11.event.type;
+#else // USE_SDL2
+
+ const int type = event.syswm.msg->event.xevent.type;
+#endif // USE_SDL2
+
switch (type)
{
logType(2, "KeyPress");
@@ -94,4 +99,3 @@ bool X11Logger::logEvent(const SDL_Event &event)
}
#endif // USE_X11
-#endif // USE_SDL2