mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-11 19:48:54 +01:00
Revert "internal/restorable: remove 'volatile' attribute when restorable is not used"
This reverts commit 9bdc89d40f
.
Reason: Unexpected changes were included
This commit is contained in:
parent
9bdc89d40f
commit
c23358ac95
@ -169,11 +169,9 @@ func NewImage(width, height int, imageType ImageType) *Image {
|
||||
}
|
||||
|
||||
var attribute string
|
||||
if needsRestoration() {
|
||||
switch imageType {
|
||||
case ImageTypeVolatile:
|
||||
attribute = "volatile"
|
||||
}
|
||||
switch imageType {
|
||||
case ImageTypeVolatile:
|
||||
attribute = "volatile"
|
||||
}
|
||||
i := &Image{
|
||||
image: graphicscommand.NewImage(width, height, imageType == ImageTypeScreen, attribute),
|
||||
|
@ -43,7 +43,6 @@ type Window interface {
|
||||
IsClosingHandled() bool
|
||||
SetMousePassthrough(enabled bool)
|
||||
IsMousePassthrough() bool
|
||||
RequestAttention()
|
||||
}
|
||||
|
||||
type nullWindow struct{}
|
||||
@ -129,6 +128,3 @@ func (*nullWindow) SetMousePassthrough(enabled bool) {
|
||||
func (*nullWindow) IsMousePassthrough() bool {
|
||||
return false
|
||||
}
|
||||
|
||||
func (*nullWindow) RequestAttention() {
|
||||
}
|
||||
|
@ -506,19 +506,3 @@ func (w *glfwWindow) IsMousePassthrough() bool {
|
||||
})
|
||||
return v
|
||||
}
|
||||
|
||||
func (w *glfwWindow) RequestAttention() {
|
||||
if w.ui.isTerminated() {
|
||||
return
|
||||
}
|
||||
if !w.ui.isRunning() {
|
||||
// Do nothing
|
||||
return
|
||||
}
|
||||
w.ui.mainThread.Call(func() {
|
||||
if w.ui.isTerminated() {
|
||||
return
|
||||
}
|
||||
w.ui.window.RequestAttention()
|
||||
})
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user