Open rdnt opened 6 hours ago
I failed to reproduce this:
package main
import (
"image/color"
"github.com/hajimehoshi/ebiten/v2"
)
type Game struct {
}
func (g *Game) Update() error {
if ebiten.IsKeyPressed(ebiten.KeyEscape) {
return ebiten.Termination
}
return nil
}
func (g *Game) Draw(screen *ebiten.Image) {
screen.Fill(color.RGBA{0x80, 0x80, 0x80, 0xff})
}
func (g *Game) Layout(width, height int) (int, int) {
return width, height
}
func main() {
ebiten.SetWindowDecorated(false)
ebiten.SetWindowPosition(0, 0)
ebiten.SetWindowSize(ebiten.Monitor().Size())
if err := ebiten.RunGame(&Game{}); err != nil {
panic(err)
}
}
Could you show me a minimized code to reproduce your issue? Thanks,
Ebitengine Version
v2.8.4
Operating System
Go Version (
go version
)go version go1.23.0 windows/amd64
What steps will reproduce the problem?
ebiten.SetWindowDecorated(false)
What is the expected result?
What happens instead?
Anything else you feel useful to add?
I have found that if the
isInitWindowDecorated
check is added on the last lines of theadjustWindowPosition
function, then the window is properly positioned. I am unsure if it is a valid fix or more work is needed to configure it (e.g. if window decorations are enabled/disabled during runtime).I am aware that if I use SetFullscreen then it can become a true fullscreen, but my usecase is around a transparent, click-pass-through, fullscreen overlay.