From 776904ee9a017e268307b84e04d675bd66824d15 Mon Sep 17 00:00:00 2001 From: Henrik Hautakoski Date: Thu, 26 Dec 2019 07:48:53 +0100 Subject: [PATCH] Platform/Unix/X11SharedDisplay: adding getAtom() --- source/Platform/Unix/X11SharedDisplay.cpp | 5 +++++ source/Platform/Unix/X11SharedDisplay.h | 3 +++ 2 files changed, 8 insertions(+) diff --git a/source/Platform/Unix/X11SharedDisplay.cpp b/source/Platform/Unix/X11SharedDisplay.cpp index bb76064..a7c691d 100644 --- a/source/Platform/Unix/X11SharedDisplay.cpp +++ b/source/Platform/Unix/X11SharedDisplay.cpp @@ -29,4 +29,9 @@ void XReleaseDisplay() { } } +Atom getAtom(const std::string& name, bool onlyIfExists) { + + return XInternAtom(sharedDisplay, name.c_str(), onlyIfExists); +} + } // namespace sp diff --git a/source/Platform/Unix/X11SharedDisplay.h b/source/Platform/Unix/X11SharedDisplay.h index 91de116..fed3a05 100644 --- a/source/Platform/Unix/X11SharedDisplay.h +++ b/source/Platform/Unix/X11SharedDisplay.h @@ -2,6 +2,7 @@ #ifndef SPECTRE_PLATFORM_UNIX_X11SHAREDDISPLAY_H #define SPECTRE_PLATFORM_UNIX_X11SHAREDDISPLAY_H +#include #include namespace sp { @@ -10,6 +11,8 @@ namespace sp { void XReleaseDisplay(); +Atom getAtom(const std::string& name, bool onlyIfExists = false); + } // namespace sp #endif /* SPECTRE_PLATFORM_UNIX_X11SHAREDDISPLAY_H */