aboutsummaryrefslogtreecommitdiff
path: root/witch.ml
diff options
context:
space:
mode:
authorGuillermo Ramos2019-06-27 11:46:17 +0200
committerGuillermo Ramos2019-06-27 11:46:17 +0200
commit992b2b3c8da1b7ae6e370c8596d3103e486ec862 (patch)
treea4f2ae4d466d2901e639150d6b776552ef345010 /witch.ml
parent5517d4df87a3e36bfe4534abcb3382bee56349ce (diff)
downloadwitch-992b2b3c8da1b7ae6e370c8596d3103e486ec862.tar.gz
Focus window on every command (not at start)HEADmaster
Diffstat (limited to 'witch.ml')
-rw-r--r--witch.ml3
1 files changed, 1 insertions, 2 deletions
diff --git a/witch.ml b/witch.ml
index 7588109..46999c4 100644
--- a/witch.ml
+++ b/witch.ml
@@ -158,7 +158,7 @@ module Comm (Wm : WM) = struct
{ st with mode = mode' }
let cmdmap =
- let press k st = Wm.send st.wid k; st in
+ let press k st = Wm.focus st.wid; Wm.send k; st in
let default_cmds =
[("up","w"); ("down","s"); ("left","a"); ("right","d");
("a","u"); ("b","h"); ("l","i"); ("r","o"); ("start","j")] in
@@ -180,7 +180,6 @@ module Comm (Wm : WM) = struct
let c_handler st0 (cfd, _) =
dup2 cfd stdin; dup2 cfd stdout; dup2 cfd stderr; close cfd;
- Wm.focus st0.wid;
let rec loop st =
match st.mode with
| Cmd ->