<20111020050700.25b921a25...@maile.rambler.ru>) Mime-Version: 1.0 Content-type: text/plain; charset="UTF-8"
>>>I was wondering if there was a way to force the focus to follow a >>>move-window. I have my mouse focus policy set to :sloppy, so I'm not >>>sure if that is causing me to lose window focus when I do a >>> move-window. >> >> My StumpWM ignores mouse for focus and focus follows move-window. >> >> My understanding of sloppy is "focus is where the mouse is", so I cannot >> see why move-window could not lead to focus loss - the window is now not >> where the mouse is, after all. >> >> You can define a command that does a move-window and then does ratwarp >> to the center of the target frame in your StumpWM rc file. > >I modified move-focus-and-or-window in tile-group.lisp to be as follows: > >(defun move-focus-and-or-window (dir &optional win-p) > (declare (type (member :up :down :left :right) dir)) > (let* ((group (current-group)) > (new-frame (neighbour dir (tile-group-current-frame group) > (group-frames group))) > (window (current-window))) > (when new-frame > (if (and win-p window) > (progn > (pull-window window new-frame) > (when (eq *mouse-focus-policy* :sloppy) > (progn > (focus-frame group new-frame) > (warp-pointer (window-screen window) > (+ 8 (frame-x new-frame)) > (+ 8 (frame-y new-frame)))))) > (focus-frame group new-frame))))) > >Seems to work for me now. Thanks for the advice. I recommend putting this into .stumpwmrc - so you will not lose it across StumpWM updates. Whether it is a good change for mainline, I am not sure... _______________________________________________ Stumpwm-devel mailing list Stumpwm-devel@nongnu.org https://lists.nongnu.org/mailman/listinfo/stumpwm-devel