ui/app: don't implicitly redraw for each CommandEvent

Redrawing should only be scheduled when some UI state has changed.

Window has no way to know whether a CommandEvent was ignored by
the client, so push the onus to the client to schedule a redraw.

Signed-off-by: Elias Naur <mail@eliasnaur.com>
This commit is contained in:
Elias Naur
2019-07-12 14:05:18 +02:00
parent 343934d3de
commit 326f78c341
-1
View File
@@ -242,7 +242,6 @@ func (w *Window) event(e Event) {
w.setNextFrame(time.Time{})
case *CommandEvent:
needAck = true
w.setNextFrame(time.Time{})
case StageEvent:
w.stage = e.Stage
if w.stage > StageDead {