aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDerek Stevens <nilix@nilfm.cc>2021-03-10 00:22:21 -0500
committerDerek Stevens <nilix@nilfm.cc>2021-03-10 00:22:21 -0500
commitc4a0ea2970e8887ea7f5c47427a84e4dd6d49089 (patch)
tree387f45c6e22d598615b1f7c6a92acecf5200c3e9
parent1102e2670740470648d564620bb2008a86cf2d39 (diff)
key.c: zoom maximizes current window
-rw-r--r--key.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/key.c b/key.c
index 81d957b..165ff0a 100644
--- a/key.c
+++ b/key.c
@@ -457,8 +457,17 @@ void keypress(XKeyEvent* e) {
stick(current);
#endif
#ifdef ZOOM_KEY
- else if (e->keycode == zcode && (e->state & SHORTCUTMOD) == (MODBITS))
+ else if (e->keycode == zcode && (e->state & SHORTCUTMOD) == (MODBITS)) {
zoom = !zoom;
+ if (zoom) {
+ quickreshape(
+ current,
+ -BORDER,
+ -BORDER,
+ ra.width + 2 * BORDER,
+ ra.height + 2 * BORDER);
+ }
+ }
#endif
/* half snap */