summaryrefslogtreecommitdiff
path: root/src/utils/copynpaste.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2013-08-24 14:51:24 +0300
committerAndrei Karas <akaras@inbox.ru>2013-08-24 21:08:17 +0300
commit8f670620dbf4c8092e9f834f9d65cbc607b81511 (patch)
tree1a1a8e51ecaa65955639c3f9279f6f704e6dac5d /src/utils/copynpaste.cpp
parented77e8fb99e16e72cde0e163a9b58c5cefd8d05d (diff)
downloadmanaverse-8f670620dbf4c8092e9f834f9d65cbc607b81511.tar.gz
manaverse-8f670620dbf4c8092e9f834f9d65cbc607b81511.tar.bz2
manaverse-8f670620dbf4c8092e9f834f9d65cbc607b81511.tar.xz
manaverse-8f670620dbf4c8092e9f834f9d65cbc607b81511.zip
move WMInfo function calls into SDL helper.
Diffstat (limited to 'src/utils/copynpaste.cpp')
-rw-r--r--src/utils/copynpaste.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/utils/copynpaste.cpp b/src/utils/copynpaste.cpp
index 1d4297fd5..86b5a668c 100644
--- a/src/utils/copynpaste.cpp
+++ b/src/utils/copynpaste.cpp
@@ -35,6 +35,10 @@
#include "utils/copynpaste.h"
+#include "graphics.h"
+
+#include "utils/sdlhelper.h"
+
#include <SDL_syswm.h>
#include "debug.h"
@@ -339,12 +343,10 @@ static char* getSelection(Display *const dpy, Window us, Atom selection)
bool retrieveBuffer(std::string& text, size_t& pos)
{
-// +++ need use SDL_GetWindowWMInfo
-#ifndef USE_SDL2
SDL_SysWMinfo info;
SDL_VERSION(&info.version);
- if (SDL_GetWMInfo(&info))
+ if (SDL::getWindowWMInfo(mainGraphics->getWindow(), &info))
{
Display *const dpy = info.info.x11.display;
Window us = info.info.x11.window;
@@ -378,7 +380,6 @@ bool retrieveBuffer(std::string& text, size_t& pos)
return true;
}
}
-#endif
return false;
}