EgonOlsen71 / basicv2

A Commodore (CBM) BASIC V2 interpreter/compiler written in Java
https://egonolsen71.github.io/basicv2/
The Unlicense
84 stars 15 forks source link

GUI has two different sizes #58

Open viteisele opened 1 year ago

viteisele commented 1 year ago

After starting console or basicshell there is the problem, that the GUI can have different screen sizes. E. g. console can have two diffent sizes image image

With console it is only a cosmetic problem, but basicshell is often so small that it must be retarted to be able to work with it.

I'm using Ubuntu with WSL and VcSrv X Server. With C64Screen there is no such problem.

EgonOlsen71 commented 1 year ago

Can you provide an example of how BasicShell looks when this happens?

viteisele commented 1 year ago

It is the black line:

image

I started BasicShell four times: the first three attemps were as expected, but then the windows is very small. The good news: it can be resized

EgonOlsen71 commented 1 year ago

Strange. I've never seen this behaviour. I've modified the GUI initialization code of the BasicShell to see if that has any effect. Please give it a try.

viteisele commented 1 year ago

Console: Small size at the first start, then always the bigger size BasicShell: the size toggles: big, black line, big, black line, ...

EgonOlsen71 commented 1 year ago

No idea then...I've switched the order of some stuff in the BasicShell, please see if that does something...

viteisele commented 1 year ago

Perhaps this helps: here is the hwininfo of the big and the little windows:

xwininfo: Window id: 0x200003 (can't convert UTF8_STRING to unknown encoding)

Absolute upper-left X: 0 Absolute upper-left Y: 0 Relative upper-left X: 0 Relative upper-left Y: 0 Width: 800 Height: 600 Depth: 24 Visual: 0x21 Visual Class: TrueColor Border width: 0 Class: InputOutput Colormap: 0x20 (installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +0+0 -352+0 -352-272 +0-272 -geometry 800x600+0+0

xwininfo: Window id: 0x200003 (can't convert UTF8_STRING to unknown encoding)

Absolute upper-left X: 0 Absolute upper-left Y: 0 Relative upper-left X: 0 Relative upper-left Y: 0 Width: 120 Height: 1 Depth: 24 Visual: 0x21 Visual Class: TrueColor Border width: 0 Class: InputOutput Colormap: 0x20 (installed) Bit Gravity State: NorthWestGravity Window Gravity State: NorthWestGravity Backing Store State: NotUseful Save Under State: no Map State: IsViewable Override Redirect State: no Corners: +0+0 -1032+0 -1032-871 +0-871 -geometry 120x1+0+0

EgonOlsen71 commented 1 year ago

The problem seems to be, that Java's layout manager thinks, that the window is empty when it actually shouldn't be. That's quite strange and I can't reproduce it. I'm on vacation now for two weeks but I'll try to reproduce it on Linux afterwards.

viteisele commented 1 year ago

The different window size is not really a problem, so this issue can wait. I wanted to try it with a commerical XServer, but it can't find the bought license number. So I have two weeks time for searching it ;-)

Have a beautiful holiday