On Tue 2020.01.14 at 08:49 +0100, Stefan Hagen wrote: > Hello, > > when using the window-snap-{up,down,left,right} functions in CWM(1), the > window might jump away from the cursor, which makes it loose focus. > > The window move and resize functions are "dragging" the cursor with them > along the side of the window. > > The attached simple patch warps the cursor with the window, so it stays > within it's relative position within the window.
Thanks for the report. I believe using client_ptr_inbound() would be more appropriate, for client_ptrwarp() will use the last saved pointer position, which may, or may not, be the expected positon once warp'd. client_ptr_inbound() will only warp if the pointer is out-of-bounds, plus it will warp just enough - this is how all the other similar actions behave as well. Index: kbfunc.c =================================================================== RCS file: /home/open/cvs/xenocara/app/cwm/kbfunc.c,v retrieving revision 1.166 diff -u -p -r1.166 kbfunc.c --- kbfunc.c 13 Aug 2019 18:45:38 -0000 1.166 +++ kbfunc.c 15 Jan 2020 15:09:28 -0000 @@ -322,6 +322,7 @@ kbfunc_client_snap(void *ctx, struct car } } client_move(cc); + client_ptr_inbound(cc, 1); } void