refactor: drop unused consumed flag and group Mod constants in the facade
- commit
- c104571058ee42bf86ccf5ee847109200e107dc9
- author
- brice · · 2026-10-01 17:53 UTC
- parent
- 8b015e3
- signature
- GPG Verified
CD88F9E564E0102646FB6077A1A07C7C7C3E349D· arch-gpg Verified for the committer email
3 files · +2 -5
M internal/ui/runtime.go +0 -2
| @@ -43,7 +43,6 @@ type runtime struct { | |||
| 43 | 43 | pasteID uint64 | |
| 44 | 44 | ime edit.IME | |
| 45 | 45 | redraw bool | |
| 46 | - | consumed bool // the last committed build handled input events | |
| 47 | 46 | inputRects []Rect | |
| 48 | 47 | inputNil, inputStaged bool | |
| 49 | 48 | } | |
| @@ -176,7 +175,6 @@ func (r *runtime) Build(view func(*Frame)) bool { | |||
| 176 | 175 | if len(events) > 0 { | |
| 177 | 176 | r.redraw = true | |
| 178 | 177 | } | |
| 179 | - | r.consumed = len(events) > 0 | |
| 180 | 178 | // Release every losing editor before enabling the winner: the IME port | |
| 181 | 179 | // represents one seat, not one port per editor. Never depend on map order. | |
| 182 | 180 | for id, editor := range r.edits { | |
| @@ -43,7 +43,6 @@ type runtime struct { | |||||
| 43 | pasteID uint64 | 43 | pasteID uint64 | ||
| 44 | ime edit.IME | 44 | ime edit.IME | ||
| 45 | redraw bool | 45 | redraw bool | ||
| 46 | - | consumed bool // the last committed build handled input events | |||
| 47 | inputRects []Rect | 46 | inputRects []Rect | ||
| 48 | inputNil, inputStaged bool | 47 | inputNil, inputStaged bool | ||
| 49 | } | 48 | } | ||
| @@ -176,7 +175,6 @@ func (r *runtime) Build(view func(*Frame)) bool { | |||||
| 176 | if len(events) > 0 { | 175 | if len(events) > 0 { | ||
| 177 | r.redraw = true | 176 | r.redraw = true | ||
| 178 | } | 177 | } | ||
| 179 | - | r.consumed = len(events) > 0 | |||
| 180 | // Release every losing editor before enabling the winner: the IME port | 178 | // Release every losing editor before enabling the winner: the IME port | ||
| 181 | // represents one seat, not one port per editor. Never depend on map order. | 179 | // represents one seat, not one port per editor. Never depend on map order. | ||
| 182 | for id, editor := range r.edits { | 180 | for id, editor := range r.edits { | ||
M nefergui.go +2 -0
| @@ -111,4 +111,6 @@ const ( | |||
| 111 | 111 | ||
| 112 | 112 | ModShift = ui.ModShift | |
| 113 | 113 | ModCtrl = ui.ModCtrl | |
| 114 | + | ModAlt = ui.ModAlt | |
| 115 | + | ModSuper = ui.ModSuper | |
| 114 | 116 | ) | |
| @@ -111,4 +111,6 @@ const ( | |||||
| 111 | 111 | ||||
| 112 | ModShift = ui.ModShift | 112 | ModShift = ui.ModShift | ||
| 113 | ModCtrl = ui.ModCtrl | 113 | ModCtrl = ui.ModCtrl | ||
| 114 | + | ModAlt = ui.ModAlt | |||
| 115 | + | ModSuper = ui.ModSuper | |||
| 114 | ) | 116 | ) | ||
M renderer.go +0 -3
| @@ -56,9 +56,6 @@ const ( | |||
| 56 | 56 | CursorPointer = ui.CursorPointer | |
| 57 | 57 | CursorText = ui.CursorText | |
| 58 | 58 | CursorNotAllowed = ui.CursorNotAllowed | |
| 59 | - | ||
| 60 | - | ModAlt = ui.ModAlt | |
| 61 | - | ModSuper = ui.ModSuper | |
| 62 | 59 | ) | |
| 63 | 60 | ||
| 64 | 61 | // NewRenderer opens the GPU named by cfg.MainDevice and loads fonts and | |
| @@ -56,9 +56,6 @@ const ( | |||||
| 56 | CursorPointer = ui.CursorPointer | 56 | CursorPointer = ui.CursorPointer | ||
| 57 | CursorText = ui.CursorText | 57 | CursorText = ui.CursorText | ||
| 58 | CursorNotAllowed = ui.CursorNotAllowed | 58 | CursorNotAllowed = ui.CursorNotAllowed | ||
| 59 | - | ||||
| 60 | - | ModAlt = ui.ModAlt | |||
| 61 | - | ModSuper = ui.ModSuper | |||
| 62 | ) | 59 | ) | ||
| 63 | 60 | ||||
| 64 | // NewRenderer opens the GPU named by cfg.MainDevice and loads fonts and | 61 | // NewRenderer opens the GPU named by cfg.MainDevice and loads fonts and | ||