Java application launching windows that are "tiny"

Seeking help with this one. First the particulars.


4 monitors in a Line (Left to right)
Monitor 0
Monitor 1
Monitor 2
Monitor 4

We have a java-based application for weather forecasting that launches multiple “scenes” into windows all of which are various sizes. Some of these windows launched are “tiny” and usually located near the top left of Monitor 0. It seems to occur for some users which suggests a setting was inadvertently turned on. I have tried to find the setting to control this behaviour, but so far have come up empty. Does anyone know what might be triggering this behaviour?

Maybe the application is “restoring” window sizes and has a corrupted config?

And where would I look under .config-kde5_ubuntu24.04 for a clue please? I don’t think it’s the application itself, although it could be.

Most applications store their config in $HOME/.config or the directory $XDG_CONFIG_HOME is pointing to.

Some store it directly in $HOME with a file name or directory starting with a . character (“hidden” file).

It is just a guess that this could be the application itself.

There could be a KWin window rule that overrides the size but the user would have had to set this up specifically.

At this stage, I am thinking no, the application doesn’t have any mis-configured configs and it’s a KDE problem. I am copying the contents of xsettingd and session/kwin_saved_at_previous_logout.
Does anything look wrong here?

xsettingsd:
Net/ThemeName “Breeze”
Gdk/UnscaledDPI 98304
Gdk/WindowScalingFactor 1
Gtk/EnableAnimations 1
Gtk/DecorationLayout “icon:minimize,maximize,close”
Gtk/PrimaryButtonWarpsSlider 0
Gtk/ToolbarStyle 3
Gtk/MenuImages 1
Gtk/ButtonImages 1
Gtk/CursorThemeSize 24
Gtk/CursorThemeName “breeze_cursors”
Net/IconThemeName “breeze”
Gtk/FontName “Noto Sans, 10”

kwin_saved_at_previous_logout

[Session]
active=-1
activities1=
activities2=
activities3=
activities4=
activities5=
count=5
desktop=1
desktop1=-1
desktop2=-1
desktop3=-1
desktop4=-1
desktop5=-1
fsrestore1=0,0,0,0
fsrestore2=0,0,0,0
fsrestore3=0,0,0,0
fsrestore4=0,0,0,0
fsrestore5=0,0,0,0
fullscreen1=0
fullscreen2=0
fullscreen3=0
fullscreen4=0
fullscreen5=0
geometry1=0,0,1920,1200
geometry2=1920,0,1920,1200
geometry3=5760,0,1920,1200
geometry4=3840,0,1920,1200
geometry5=0,1156,1920,44
iconified1=false
iconified2=false
iconified3=false
iconified4=false
iconified5=false
keepBelow1=true
keepBelow2=true
keepBelow3=true
keepBelow4=true
keepBelow5=false
maximize1=0
maximize2=0
maximize3=0
maximize4=0
maximize5=0
opacity1=1
opacity2=1
opacity3=1
opacity4=1
opacity5=1
resourceClass1=plasmashell
resourceClass2=plasmashell
resourceClass3=plasmashell
resourceClass4=plasmashell
resourceClass5=plasmashell
resourceName1=plasmashell
resourceName2=plasmashell
resourceName3=plasmashell
resourceName4=plasmashell
resourceName5=plasmashell
restore1=0,0,1920,1200
restore2=1920,0,1920,1200
restore3=5760,0,1920,1200
restore4=3840,0,1920,1200
restore5=0,1156,1920,44
sessionId1=1018313c1558a000174705511700008800820000
sessionId2=1018313c1558a000174705511700008800820000
sessionId3=1018313c1558a000174705511700008800820000
sessionId4=1018313c1558a000174705511700008800820000
sessionId5=1018313c1558a000174705511700008800820000
shaded1=false
shaded2=false
shaded3=false
shaded4=false
shaded5=false
shortcut1=
shortcut2=
shortcut3=
shortcut4=
shortcut5=
skipPager1=false
skipPager2=false
skipPager3=false
skipPager4=false
skipPager5=false
skipSwitcher1=false
skipSwitcher2=false
skipSwitcher3=false
skipSwitcher4=false
skipSwitcher5=false
skipTaskbar1=false
skipTaskbar2=false
skipTaskbar3=false
skipTaskbar4=false
skipTaskbar5=false
stackingOrder1=3
stackingOrder2=2
stackingOrder3=0
stackingOrder4=1
stackingOrder5=4
staysOnTop1=false
staysOnTop2=false
staysOnTop3=false
staysOnTop4=false
staysOnTop5=false
sticky1=true
sticky2=true
sticky3=true
sticky4=true
sticky5=true
userNoBorder1=true
userNoBorder2=true
userNoBorder3=true
userNoBorder4=true
userNoBorder5=true
windowRole1=
windowRole2=
windowRole3=
windowRole4=
windowRole5=
windowType1=Desktop
windowType2=Desktop
windowType3=Desktop
windowType4=Desktop
windowType5=Dock
wmCommand1=
wmCommand2=
wmCommand3=
wmCommand4=
wmCommand5=

One option to check if session restore is interfering is to make it start with an empty session.

This is one of the possible choices in System Settings → Desktop Sessions.

I think your app is either based on SWT/AWT or Swing.

Try running it with the following VM options:
-Dsun.java2d.dpiaware=true
or/and
-Dsun.java2d.uiScale.enabled=true

1 Like

Thanks. I will try this. Yes we are on Swing.

Update: This appears to be a problem in our Java App’s rendering order, in the windows manager, so NOT a KDE problem. Thanks for sharing some ideas anyway.

1 Like