diff options
author | kn <kn> | 2021-04-22 10:02:55 +0000 |
---|---|---|
committer | kn <kn> | 2021-04-22 10:02:55 +0000 |
commit | d46f34f01eba56f989af90e277fc0c673ad3684f (patch) | |
tree | f9396669e9d2e0438e1b6f34de869ec5e43e77f8 | |
parent | 91c05f94032debb645c14c76c9911ea5cfba5d3c (diff) | |
download | cwm-d46f34f01eba56f989af90e277fc0c673ad3684f.tar.gz cwm-d46f34f01eba56f989af90e277fc0c673ad3684f.tar.xz cwm-d46f34f01eba56f989af90e277fc0c673ad3684f.zip |
Keep pointer within window on maximize/fullscreen toggle
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] 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. Make CM-f, CM-m, CM-equal and CMS-equal (default bindings) for toggling full-screen mode, maximization, vertical maximization and horizontal maximization of the current window drag the cursor along if needed as well. OK okan kmos dv
-rw-r--r-- | client.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client.c b/client.c index cfdd048..0d93714 100644 --- a/client.c +++ b/client.c @@ -336,6 +336,7 @@ client_toggle_fullscreen(struct client_ctx *cc) 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 *cc) 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_ctx *cc) 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_ctx *cc) resize: client_resize(cc, 0); xu_ewmh_set_net_wm_state(cc); + client_ptr_inbound(cc, 1); } void |