On Thu, Apr 08, 2021 at 03:35:33AM +0200, Klemens Nanni wrote: > This scratch has been itching me for far too long and concerns the > funcionality behind those cwm(1) default bindings:
This fixes one of the few problems I have with cwm. Works well for me. ok kmos --Kurt > CM-f Toggle full-screen mode of current window. > CM-m Toggle maximization of current window. > CM-equal Toggle vertical maximization of current window. > CMS-equal Toggle horizontal maximization of current window. > > Spawn a window, maximize it in any way, move the cursor to a window > border that is not on the screen's edge and unmaximize again... > > While the window goes back the cursor stays at the screen's edge, i.e. > focus is lost to the underlaying window. > > Moving, resizing, tiling or snapping windows in any way always moves the > cursor along iff needed, e.g. using > > MS-[hjkl] Move window by a large amount; see cwmrc(5). > > to move a small window from the center to the edge keeps the cursor > within window borders -- no matter what you do with the keyboard, focus > stays on that window. > > Diff below does the same when toggling maximize/fullscreen. > > Feedback? OK? > > > > Index: client.c > =================================================================== > RCS file: /cvs/xenocara/app/cwm/client.c,v > retrieving revision 1.263 > diff -u -p -r1.263 client.c > --- client.c 16 Apr 2020 13:32:35 -0000 1.263 > +++ client.c 8 Apr 2021 01:18:56 -0000 > @@ -336,6 +336,7 @@ client_toggle_fullscreen(struct client_c > resize: > client_resize(cc, 0); > xu_ewmh_set_net_wm_state(cc); > + client_ptr_inbound(cc, 1); > } > > void > @@ -376,6 +377,7 @@ client_toggle_maximize(struct client_ctx > resize: > client_resize(cc, 0); > xu_ewmh_set_net_wm_state(cc); > + client_ptr_inbound(cc, 1); > } > > void > @@ -408,6 +410,7 @@ client_toggle_vmaximize(struct client_ct > resize: > client_resize(cc, 0); > xu_ewmh_set_net_wm_state(cc); > + client_ptr_inbound(cc, 1); > } > > void > @@ -440,6 +443,7 @@ client_toggle_hmaximize(struct client_ct > resize: > client_resize(cc, 0); > xu_ewmh_set_net_wm_state(cc); > + client_ptr_inbound(cc, 1); > } > > void >
