mirror of
https://github.com/hajimehoshi/ebiten.git
synced 2025-01-26 02:42:02 +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
|
var attribute string
|
||||||
if needsRestoration() {
|
switch imageType {
|
||||||
switch imageType {
|
case ImageTypeVolatile:
|
||||||
case ImageTypeVolatile:
|
attribute = "volatile"
|
||||||
attribute = "volatile"
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
i := &Image{
|
i := &Image{
|
||||||
image: graphicscommand.NewImage(width, height, imageType == ImageTypeScreen, attribute),
|
image: graphicscommand.NewImage(width, height, imageType == ImageTypeScreen, attribute),
|
||||||
|
@ -43,7 +43,6 @@ type Window interface {
|
|||||||
IsClosingHandled() bool
|
IsClosingHandled() bool
|
||||||
SetMousePassthrough(enabled bool)
|
SetMousePassthrough(enabled bool)
|
||||||
IsMousePassthrough() bool
|
IsMousePassthrough() bool
|
||||||
RequestAttention()
|
|
||||||
}
|
}
|
||||||
|
|
||||||
type nullWindow struct{}
|
type nullWindow struct{}
|
||||||
@ -129,6 +128,3 @@ func (*nullWindow) SetMousePassthrough(enabled bool) {
|
|||||||
func (*nullWindow) IsMousePassthrough() bool {
|
func (*nullWindow) IsMousePassthrough() bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
func (*nullWindow) RequestAttention() {
|
|
||||||
}
|
|
||||||
|
@ -506,19 +506,3 @@ func (w *glfwWindow) IsMousePassthrough() bool {
|
|||||||
})
|
})
|
||||||
return v
|
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()
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
@ -341,7 +341,3 @@ func SetWindowMousePassthrough(enabled bool) {
|
|||||||
func IsWindowMousePassthrough() bool {
|
func IsWindowMousePassthrough() bool {
|
||||||
return ui.Get().Window().IsMousePassthrough()
|
return ui.Get().Window().IsMousePassthrough()
|
||||||
}
|
}
|
||||||
|
|
||||||
func RequestWindowAttention() {
|
|
||||||
ui.Get().Window().RequestAttention()
|
|
||||||
}
|
|
||||||
|
Loading…
Reference in New Issue
Block a user