mirror of
https://git.sr.ht/~eliasnaur/gio
synced 2026-07-05 09:25:38 +00:00
ui/app,apps/gophers,apps/hello: revert NewWindow to CreateWindow
It turns out we already support multiple windows on Android: when
the activity is recreated.
This reverts commit f21b5eb1df.
Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
+4
-6
@@ -36,7 +36,6 @@ type Window struct {
|
||||
mu sync.Mutex
|
||||
stage Stage
|
||||
size image.Point
|
||||
skipAcks int
|
||||
syncGPU bool
|
||||
animating bool
|
||||
hasNextFrame bool
|
||||
@@ -208,9 +207,11 @@ func (w *Window) event(e Event) {
|
||||
case key.Event:
|
||||
needRedraw = true
|
||||
case ChangeStage:
|
||||
needAck = true
|
||||
w.stage = e.Stage
|
||||
w.syncGPU = true
|
||||
if w.stage > StageDead {
|
||||
needAck = true
|
||||
w.syncGPU = true
|
||||
}
|
||||
case Draw:
|
||||
if e.Size == (image.Point{}) {
|
||||
panic(errors.New("internal error: zero-sized Draw"))
|
||||
@@ -223,9 +224,6 @@ func (w *Window) event(e Event) {
|
||||
w.syncGPU = e.sync
|
||||
w.size = e.Size
|
||||
}
|
||||
if !needAck {
|
||||
w.skipAcks++
|
||||
}
|
||||
stage := w.stage
|
||||
w.mu.Unlock()
|
||||
if needRedraw {
|
||||
|
||||
Reference in New Issue
Block a user