You are not logged in.
Hi guys!
Trying to debug an issue regarding KeePassXC I wrote a minimal sample application. This is the source code:
// compile with: "$ g++ main.cpp -lX11 -lxcb -o x11-keysym-debug"
#include <fstream>
#include <X11/XKBlib.h>
int main()
{
Display *dpy = XOpenDisplay(NULL);
int keycode = XKeysymToKeycode(dpy, 39);
std::ofstream ofs("/tmp/x11-keysym-debug.log", std::ios::out | std::ios::app);
ofs << keycode << std::endl;
return 0;
}
The problem I'm facing is that when executed via Xfce's autostart feature, the log file contains the string "48". When I execute the program manually under Xfce, the log file contains the value "51". In other words: The keycode given for the keysym 39 is different depending on whether Xfce auto-executed my application or the user executed it manually. Why is this the case?
When I log out and then log in again, the value is "51" like it should be. "48" only occurs after a reboot.
Some more information about my system:
Distribution: Arch Linux
libX11 version: 1.6.6
Xfce version: 4.12
I hope you can point me into the right direction to find out why this is the case. I was not successful compiling libX11 myself, adding some debugging code.
Do you have any idea what's different in the system's state between the point where Xfce runs the autostart applications and some seconds later, when the UI is fully loaded and the program is ran via a terminal?
Offline
[ Generated in 0.005 seconds, 7 queries executed - Memory usage: 516.3 KiB (Peak: 529.82 KiB) ]