Xfce Forum

Sub domains
 

You are not logged in.

#1 2018-10-08 21:14:14

xfceguy
Member
Registered: 2018-10-08
Posts: 1

Different application behavior with autostart/manual app execution

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

Board footer

Powered by FluxBB