mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2024-12-24 18:58:54 +01:00
ui: Bug fix: Window title might lost on macOS (#267)
This commit is contained in:
parent
64ed7b93f6
commit
76da09f74c
@ -30,6 +30,7 @@ import (
|
|||||||
)
|
)
|
||||||
|
|
||||||
type userInterface struct {
|
type userInterface struct {
|
||||||
|
title string
|
||||||
window *glfw.Window
|
window *glfw.Window
|
||||||
width int
|
width int
|
||||||
height int
|
height int
|
||||||
@ -218,6 +219,7 @@ func Run(width, height int, scale float64, title string, g GraphicsContext) erro
|
|||||||
if !u.setScreenSize(width, height, scale, false) {
|
if !u.setScreenSize(width, height, scale, false) {
|
||||||
return errors.New("ui: Fail to set the screen size")
|
return errors.New("ui: Fail to set the screen size")
|
||||||
}
|
}
|
||||||
|
u.title = title
|
||||||
u.window.SetTitle(title)
|
u.window.SetTitle(title)
|
||||||
u.window.Show()
|
u.window.Show()
|
||||||
|
|
||||||
@ -402,6 +404,8 @@ func (u *userInterface) setScreenSize(width, height int, scale float64, fullscre
|
|||||||
default:
|
default:
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
// Window title might lost on macOS after coming back from fullscreen.
|
||||||
|
u.window.SetTitle(u.title)
|
||||||
}
|
}
|
||||||
// TODO: Rename this variable?
|
// TODO: Rename this variable?
|
||||||
u.sizeChanged = true
|
u.sizeChanged = true
|
||||||
|
Loading…
Reference in New Issue
Block a user