diff --git a/io/router/key_test.go b/io/router/key_test.go index dd15c29b..d91d1386 100644 --- a/io/router/key_test.go +++ b/io/router/key_test.go @@ -30,11 +30,6 @@ func TestKeyWakeup(t *testing.T) { if evts := r.Events(handler); len(evts) != 1 { t.Errorf("no Focus event for newly registered key.InputOp") } - // Verify that r.Events does trigger a redraw. - r.Frame(&ops) - if _, wake := r.WakeupTime(); !wake { - t.Errorf("key.FocusEvent event didn't trigger a redraw") - } } func TestKeyMultiples(t *testing.T) { diff --git a/io/router/pointer_test.go b/io/router/pointer_test.go index 2c632152..c83a85f8 100644 --- a/io/router/pointer_test.go +++ b/io/router/pointer_test.go @@ -33,11 +33,6 @@ func TestPointerWakeup(t *testing.T) { } // However, adding a handler queues a Cancel event. assertEventPointerTypeSequence(t, r.Events(handler), pointer.Cancel) - // Verify that r.Events does trigger a redraw. - r.Frame(&ops) - if _, wake := r.WakeupTime(); !wake { - t.Errorf("pointer.Cancel event didn't trigger a redraw") - } } func TestPointerDrag(t *testing.T) { diff --git a/io/router/router.go b/io/router/router.go index 6817c2c8..92c2b10a 100644 --- a/io/router/router.go +++ b/io/router/router.go @@ -593,16 +593,6 @@ func (h *handlerEvents) HadEvents() bool { func (h *handlerEvents) Events(k event.Tag) []event.Event { if events, ok := h.handlers[k]; ok { h.handlers[k] = h.handlers[k][:0] - // Schedule another frame if we delivered events to the user - // to flush half-updated state. This is important when an - // event changes UI state that has already been laid out. In - // the worst case, we waste a frame, increasing power usage. - // - // Gio is expected to grow the ability to construct - // frame-to-frame differences and only render to changed - // areas. In that case, the waste of a spurious frame should - // be minimal. - h.hadEvents = h.hadEvents || len(events) > 0 return events } return nil