New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
internal/ui: a window size is not appropriate on i3wm #2951
Comments
I'll take a look |
@hajimehoshi Thanks, for the time being I downgraded to 2.6.7 on my side, however this should be only temporary solution as I can't use EDIT: The program also allows for fractional values but with 2.7.0, it seems like there might be minimum window size set somewhere causing this behavior |
I couldn't reproduce the issue with my desktop:
What is your display's scale? #2225 might be related. /CC @tinne26
|
This change uses a scaled window size with a fix logical screen size in order to let Ebitengine do a better scaling. Updates crgimenes#24 Updates hajimehoshi/ebiten#2951
@hajimehoshi |
Hmm, I couldn't reproduce your issue with 100% scaling...
Would it be possible to git-bisect what was the culprit Ebitengine commit to you? |
@hajimehoshi I honestly wanted to do this at some point so yeah I can do that, just gotta google how to import packages from folder |
@DarkReaper231 Thanks. You can do that by adding this line in go.mod:
|
@hajimehoshi Actually there is an easier way of just doing |
Found the commit! The scale issue started with this commit |
|
@hajimehoshi The issue is not present on your for commits before 5774cf8 That commit brings it back even with your fix |
So, is the answer yes? |
@hajimehoshi yes and the exact commit which causes it is 5774cf8 |
I'll try cloning that exact commit and importing it somehow to neko so I can tell you which line exactly causes it |
@hajimehoshi I don't think I can do that, I tried putting it in /usr/lib/go/src but it yells at me that stuff is missing and when I try to import it, it says stuff like |
You cannot put a thrid party Go source to go/src directly. |
@hajimehoshi So what do we do? How can I check which line in 5774cf8 breaks it? |
Have you tried #2951 (comment) ? |
type Config struct {
Speed int `ini:"speed" cfg:"speed" cfgDefault:"2" cfgHelper:"The speed of the cat."`
Scale float64 `ini:"scale" cfg:"scale" cfgDefault:"2.0" cfgHelper:"The scale of the cat."`
Quiet bool `ini:"quiet" cfg:"quiet" cfgDefault:"false" cfgHelper:"Disable sound."`
} Isn't x2 the default scale by the way? |
Yes but scale 1 should work too |
@hajimehoshi Scale 1 looks like scale 2 basically and fractional values don't do anything now, they just looks like scale 2 too but only with your fix to neko. Without that fix, it's just giant pixels. I am currently replacing the version to test the lines from the breaking commits |
@hajimehoshi Found the culprit These are the lines that break the scale EDIT: Removing the lines also works for crgimenes/neko#27 |
I commented on the commit and asked the contributor what does that piece of code do |
@hajimehoshi How did you make scale 1 work for you? For me it's the lines I mentioned above. I noticed that in your screenshot it looks correct. Or maybe your screen resolution is just larger. EDIT: It's the latter, I set the screenshot to 100% percent of the size |
@hajimehoshi Can you try removing the lines mentioned here #2951 (comment) on your side to see what effect it will have for you on different screen resolution? For me it fixes the issue and scale 1 is the correct scale now |
As far as I cannot reproduce your issue in my environment, it is hard to confirm whether my fix is correct or not (especailly it is hard to tell what kind of side effects there are). I'd like to focus the issue #2952 first and then revisit this.
Nothing changes on my machine. On some machines, a small window might be visible in an unexpected way. I need to try more.
Ebitengine does automatic scaling by |
@DarkReaper231 What desktop system are you using by the way? (I'm using Cinnamon) |
@hajimehoshi I have i3wm, could be some oddity with tiling wm |
I installed i3wm but I have no idea what to do lol |
@DarkReaper231 Thanks, I could fix this based on your investigation! I cherry-picked the fix to 2.7 branch. I'll release v2.7.1 few days later if there is no other issue. If you want to try this earlier, you can try:
Thanks! |
@hajimehoshi wow the fact that you installed i3wm just for this is wild. Never met a contributor that would go to such lengths. Also maybe reporting this to i3wm wouldn't be bad idea I think if you feel like it's problem with i3wm itself. |
Thank you for confirming the fix!
Or maybe GLFW? It is ideal if we could dive into this but wild things often happen with Linux desktops so I hope someone could do this.. |
Hmm, the fix caused a side effect: a window is unexpectedly shown when launching an app. I'll consider a better fix. |
@hajimehoshi I don't see that issue on my side. Or maybe I'm just blind |
I confirmed this issue with Cinnamon and examples/blocks. I came up with a better fix. |
@hajimehoshi Just wanna confirm that the better fix still works on my machine, good job! |
@DarkReaper231 So, you tested 4d268f5 (2.7) ? Thanks! |
@hajimehoshi I tested 9c070eb just to make sure that leading commits didn't break anything |
This commit should also be fine (though this would be different from v2.7.1). Thanks! |
Ebitengine Version
2.7.0
Operating System
Go Version (
go version
)1.22.2
What steps will reproduce the problem?
Switch from 2.6.7 to 2.7.0, it probably only happens if the window is initially very small but that's intended and it worked flawlessly on 2.6.7
What is the expected result?
The size of the window should stay the same across the versions no matter of the initial size
What happens instead?
The window is larger
Here is a before and after
The smaller one is compiled with version 2.6.7 and the other one with 2.7.0
Anything else you feel useful to add?
The problem occurs in this program https://github.com/crgimenes/neko
But I already isolated the issue and can tell for certain that it's an issue with this library specifically
Here is an issue I opened in that repository crgimenes/neko#24 (comment)
The text was updated successfully, but these errors were encountered: