package oxbow
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>
Dynamic window manager for the river Wayland compositor
Install
dune-project
Dependency
Authors
Maintainers
Sources
v0.1.0.tar.gz
md5=a637acaa0e19046cd65fff733874eb97
sha512=76230cbecd7510de7a05b5d1f335915ef7b6c4aa557d8dbfd23591606618d2cfa25082d17b93f2f4b53a118d1cbf6a80e4ad51cf0f099b4921fb83d6df0c9801
doc/src/oxbow.ops/pointer.ml.html
Source file pointer.ml
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53open! Oxbow_core open! Oxbow_state open! Oxbow_ipc let follow_allowed (policy : Focus_follows_policy.t) (w : Window.t) = match policy with | Always -> true | Never -> false | Not_scrolling -> not @@ Window.scroll_clipped w ;; let handle_position (wm : Wm.t) (seat : Seat.t) (x, y) = let pos_changed = seat.position <> { x; y } in Seat.set_position seat (x, y); if wm.config.focus_follows_pointer <> Never && Option.is_none seat.op then ( match Output.at_point ~x ~y wm.outputs with | None -> Seat.set_cursor_target seat None | Some o -> if not @@ Phys.opt_holds o seat.output then Seat.focus_output seat @@ Some o; (match seat.hovered with | Some w when (not @@ Phys.opt_holds w seat.cursor_target) && follow_allowed wm.config.focus_follows_pointer w -> if pos_changed then Seat.set_focus_state seat @@ Refresh w; Seat.set_cursor_target seat seat.hovered | _ -> ())) ;; let warp_target seat = let center (g : int32 Rect.t) = Int32.(add g.x (div g.w 2l), add g.y (div g.h 2l)) in let target = match Seat.focused_window seat with | Some w -> Some w.geom | None -> Option.map (fun (o : Output.t) -> o.geom) seat.output in match target with | None -> None | Some g -> Some (center g) ;; let handle wm _seat (cmd : Command.Input.Pointer.t) = let () = match cmd with | Follow policy -> Config.set_focus_follows_pointer wm policy | Cycle_follow -> Focus_follows_policy.cycle wm.config.focus_follows_pointer |> Config.set_focus_follows_pointer wm | Warp b -> Config.set_warp_on_focus wm b | Toggle_warp -> Config.set_warp_on_focus wm @@ not wm.config.warp_on_focus in Ok None ;;
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>