more debug
This commit is contained in:
23
human.ml
23
human.ml
@ -573,7 +573,8 @@ module NVG = struct
|
|||||||
include Graphv_webgl.Color
|
include Graphv_webgl.Color
|
||||||
|
|
||||||
let none = Color.transparent
|
let none = Color.transparent
|
||||||
let transparent = rgbaf ~r:0. ~g:0. ~b:0. ~a:0.000001
|
|
||||||
|
(* let transparent = rgbaf ~r:0. ~g:0. ~b:0. ~a:0.000001 *)
|
||||||
let gray a = rgbf ~r:a ~g:a ~b:a
|
let gray a = rgbf ~r:a ~g:a ~b:a
|
||||||
let light = gray 0.8
|
let light = gray 0.8
|
||||||
let dark = gray 0.2
|
let dark = gray 0.2
|
||||||
@ -1260,7 +1261,7 @@ module Nottui = struct
|
|||||||
let request_var (v : var) =
|
let request_var (v : var) =
|
||||||
incr clock;
|
incr clock;
|
||||||
Log.debug (fun m ->
|
Log.debug (fun m ->
|
||||||
m "Focus.request_var v=%d clock=%d" (Lwd.peek v) !clock);
|
m "Focus.request_var v=%d->%d" (Lwd.peek v) !clock);
|
||||||
Lwd.set v !clock
|
Lwd.set v !clock
|
||||||
|
|
||||||
let request ((v, _) : handle) = request_var v
|
let request ((v, _) : handle) = request_var v
|
||||||
@ -1621,10 +1622,9 @@ module Nottui = struct
|
|||||||
let has_focus t = Focus.has_focus t.focus
|
let has_focus t = Focus.has_focus t.focus
|
||||||
|
|
||||||
let rec pp ppf t =
|
let rec pp ppf t =
|
||||||
if has_focus t then
|
(* if has_focus t then*)
|
||||||
F.pf ppf "@[<hov>%a %a@]" Focus.pp_status t.focus pp_desc
|
F.pf ppf "@[<hov>%a %a@]" Focus.pp_status t.focus pp_desc t.desc
|
||||||
t.desc
|
(* else F.pf ppf "@[<hov> %a@]" pp_desc t.desc *)
|
||||||
else F.pf ppf "@[<hov> %a@]" pp_desc t.desc
|
|
||||||
|
|
||||||
and pp_desc ppf = function
|
and pp_desc ppf = function
|
||||||
| Atom a ->
|
| Atom a ->
|
||||||
@ -1814,7 +1814,10 @@ module Nottui = struct
|
|||||||
let update_focus ui =
|
let update_focus ui =
|
||||||
match ui.focus with
|
match ui.focus with
|
||||||
| Focus.Empty | Focus.Handle _ -> ()
|
| Focus.Empty | Focus.Handle _ -> ()
|
||||||
| Focus.Conflict i -> solve_focus ui i
|
| Focus.Conflict i ->
|
||||||
|
Log.debug (fun m ->
|
||||||
|
m "update_focus Conflict %d -> solve_focus ()" i);
|
||||||
|
solve_focus ui i
|
||||||
|
|
||||||
let rec t_size_desc_of_t vg (size : box2) (ui : Ui.t desc) =
|
let rec t_size_desc_of_t vg (size : box2) (ui : Ui.t desc) =
|
||||||
match ui with
|
match ui with
|
||||||
@ -3201,7 +3204,11 @@ module Widgets = struct
|
|||||||
Lwd.peek cursor
|
Lwd.peek cursor
|
||||||
|> Option.iter (fun cursor ->
|
|> Option.iter (fun cursor ->
|
||||||
Lwd_table.get cursor
|
Lwd_table.get cursor
|
||||||
|> Option.iter (fun (f, _) -> Focus.request f));
|
|> Option.iter (fun (f, _) ->
|
||||||
|
Log.debug (fun m ->
|
||||||
|
m "tree_nav has_focus request %a"
|
||||||
|
Focus.pp_status focus');
|
||||||
|
Focus.request f));
|
||||||
Ui.keyboard_area ~focus:focus' (fun k ->
|
Ui.keyboard_area ~focus:focus' (fun k ->
|
||||||
Log.debug (fun m ->
|
Log.debug (fun m ->
|
||||||
m "keyboard_area: tree_nav %a" Ui.pp_keys k);
|
m "keyboard_area: tree_nav %a" Ui.pp_keys k);
|
||||||
|
|||||||
Reference in New Issue
Block a user