Unusual Window / Startup / Taskbar behaviour

Started by Ir3n!cus, January 07, 2025, 10:05:13

Previous topic - Next topic

Ir3n!cus

I try to develope a java application with LibGdx for Raspberry 4. The Raspberry runs the standard OS.
For short debug cycles I ran this application during developement mostly on windows and only deploy it to the raspberry after bigger features are complete.

I want the app to get a "Taskbar-Item" and to start in fullscreen mode. Since both happends on windows, i would assume I configured the app internal settings correct.

On the raspberry there are two problems.
  • The app starts minimized / iconified. There is no visual window on the desktop.
  • The app gets no "Taskbar-Item". There is no "clickable instance" on the desktop to bring the app to front.

I already opened a thread to the second problem in the raspberry forum, but got no answer:

Raspberry Forum Post

My main problem is, that I cannot figure out the root cause and the element to take care of.
What participates on this problems and must be changed?
  • Java Runtime Environment?
  • LibGdx?
  • LWJGL?
  • OpenGL?
  • Wayfire?
  • Wayland?
  • LabWC?
  • mf-panel-pi?
  • ..... ?

The only point I can say is that this does not happend with a selfmade Java-Swing-Gui-App to test this.
The swing app gets a Taskbar-Item and the window show up on startup normally.
And all other applications like the raspberry terminal app getting window and taskbar-item, too

This seems to happend only with LibGdx/LWJGL - Java - Appllications.

spasi

Hey Ir3n!cus,

If the Raspberry defaults to Wayland, then that's the most likely problem. LWJGL versions before 3.3.5 always used GLX by default. With 3.3.5, Wayland is detected automatically and LWJGL switches to EGL internally.

If you cannot update to 3.3.5+, a workaround is possible. Add the following before init:

if (glfwGetPlatform() == GLFW_PLATFORM_WAYLAND) {
    Configuration.OPENGL_EXPLICIT_INIT.set(true);
    GL.create(EGL.getFunctionProvider());
}