wip
This commit is contained in:
parent
bd1ba94339
commit
57c3cee786
|
@ -294,6 +294,8 @@ let edit_field state ~on_change ~on_submit =
|
|||
[I.string A.empty (if text = "" then " " else text)]
|
||||
in
|
||||
let handler = function
|
||||
| `ASCII 'U', [`Ctrl] -> on_change ("", 0); `Handled (* clear *)
|
||||
| `Escape, [] -> Focus.release focus; `Handled
|
||||
| `ASCII k, _ ->
|
||||
let text =
|
||||
if pos < String.length text then (
|
||||
|
|
|
@ -615,10 +615,10 @@ struct
|
|||
match t.desc with
|
||||
| Atom _ | Overlay _ -> acc
|
||||
| X (a, b) | Y (a, b) | Z (a, b) ->
|
||||
(* Default to left/top-most branch if there is no focus *)
|
||||
(* Try left/top most branch first *)
|
||||
if Focus.has_focus b.focus
|
||||
then dispatch_key_branch acc b
|
||||
else dispatch_key_branch acc a
|
||||
else dispatch_key_branch (dispatch_key_branch acc b) a
|
||||
| Focus_area (t, f) -> dispatch_key_branch (f :: acc) t
|
||||
| Mouse_handler (t, _) | Size_sensor (t, _)
|
||||
| Scroll_area (t, _, _) | Resize (t, _, _) ->
|
||||
|
|
Loading…
Reference in New Issue