force a java based game to go fullscreen (in a dock)

using Bolt flatpak to launch old school runescape (via runelite) on the librem 5, and it does runs on the dock, but it currently only using a small part of the dock’s screen. If I could force fullscreen, then maybe I could use nice to keep java from eating all the resources (oh wait that’s what java does j/k) anyway.. thought I would share and see if anyone had any ideas of how to force the app fullscreen.

P.S normal moving / resizing keyboard shortcuts just leave huge blank edges / borders.

Phosh is forked from GNOME and the GNOME hotkey is F11 to make an app full-screen, I believe. I have used this with Waydroid to do full screen Android simulation on Librem 5 in the past if I needed to pretend that I was carrying an Android phone around.

Are you saying that even F11 is leaving huge blank edges? What happens if you go into Settings > Display and turn off the L5 screen and leave only the doc monitor turned on?

I haven’t played this game in particular, instead I was playing World of Warcraft rewritten by me in java on my librems so I suppose in some long-forgotten era I would be your ideological enemy. But given the technological similarity I looked at the code of the game on my lunch break and I have some suggestions. If I were you and I had this problem, I’d probably just build and run from source so that I would have the full access to change whatever I want.

I’ve tinkered with a bunch of swing apps on desktop, which are 80% overlap with applets but not identical, so the javascript wrapper part or whatever is something I’m not familiar with. But on the Java side it seems to construct ClientPanel which subclasses JPanel and then stick that inside a custom layout instead of using one of the default layout classes. I wouldn’t be surprised at all if when you push F11 the number of things wrapping other things adds your sidebars (some gross applet wrapper → ClientUI.java’s “content” variable → ClientPanel). Panels in other panels like this are easily likely to add sidebars.

If the exterior applet wrapper is the problem, then I’m unsure how to help you. If the outer content panel in the ClientUI class is the problem, then it might be solved by adding or removing this mysterious g flag somehow in your config launch parameters:

If that flag doesn’t help, if I were you then I would probably try to manipulate the GAME_FIXED_SIZE value thats getting used on the ContentPanel: runelite/runelite-client/src/main/java/net/runelite/client/ui/ClientPanel.java at master · runelite/runelite · GitHub

but it’s a good sign that ContentPanel does not call setMaximumSize and uses a BorderLayout with BorderLayout.CENTER because the “center” value on border layout is generally supposed to expand outward like you need.

I have several apps constructed from the same JPanel class (same as the ContentPanel we see in Runelite’s source) that I have run on Librem 5 and they were able to fill the screen as I recall

You can run the application wrapped with a nested compositor like cage or gamescope that give you control over how the content is being scaled and presented.

Phosh isn’t forked from GNOME. GNOME Mobile is a fork of GNOME; Phosh is a separate project written from scratch that relies on GNOME components.