Problems with RasPi/TouchUI/X11/Xorg

Hi and happy newyear !

I've no idea where I could post this. It's about OctoPi + OctoPrint + TouchUI, and X11.

I'm developping (in C/C++) a little app that is not a plugin, but is intended to run along with OctoPrint+TouchUI. I coded with X APIs a daemon that popup a window with no decorations and that shows when pushing a button hooked to the GPIO. Fine ! Until I tested it over a maximized Chromium browser displaying OctoPrint. Bummer ! My "always on top" little window was covered with Chromium, and couldn't be seen. I learned the hard way that no window can be over a full screen window ! The Raspbian window manager does not allow it. (seems silly to me, but it is so)

But it is intended to run on a RasPi with TouchUI and therefore Matchbox as window manager... And I read that matchbox allows for dialogs (with or without parent window) floating over a full screen windows (for example for virtual keyboards).

So, I tested again my app against Matchbox... No way ! X tells me permission denied or whatever, refusing to give me a display when I call XOpenDisplay() : always returns NULL. And I didn't find any totorial about Matchbox.

TouchUI launches the X srever as root. Could it be the reason why I can't get access to the screen ? But "sudo" does not help.

For now, there are two workarounds :

  • writing directly to the framebuffer, bare metal. Already done. It was the first version, it works fine, but it is really dirty ! No need to explain further why...
  • making my app a OctoPrint plugin. A bit too much for the little thing I made, and overcomplicated (however, I installed the dev tools and started with the tutorials ; not easy because my app relies on high speed SPI)

Could someone tell me why a Pi running OctoPi and TouchUi refuses to give me a screen when calling XOpenDisplay() ?

PS : this is not the only problem : after installing Pixel on the Pi, no more system menu bar (or dock), booting to Pixel, or starting it from a console with "sudo startx".

No answers : not sure the question was understood. Maybe this short video (2 minutes) will help

:https://youtu.be/vd2Wgo4UeBw:

This is framebuffer painting and bare metal code ( \m/ ). I'd like to get access to the Matchbox windows manager installed by TouchUI autorun. Always returns NULL (no access to the screen), and there is very little or no information about Matchbox on the web (spent hours searching).