summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorSuleyman Farajli <suleyman@farajli.net>2024-08-17 13:27:18 +0400
committerSuleyman Farajli <suleyman@farajli.net>2024-08-17 13:27:18 +0400
commite70b0cffddf227a01b7085f97e74c847e205e93c (patch)
tree206b3243da91484551711a7205ed784cc56d019f /dwm.c
parentd511262546ba53115ac8889cc73d464c778dda06 (diff)
moveresize patched and keybinds changed
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/dwm.c b/dwm.c
index 29b279b..8f7b775 100644
--- a/dwm.c
+++ b/dwm.c
@@ -184,6 +184,7 @@ static void mappingnotify(XEvent *e);
static void maprequest(XEvent *e);
static void motionnotify(XEvent *e);
static void movemouse(const Arg *arg);
+static void moveresize(const Arg *arg);
static Client *nexttiled(Client *c);
static void pop(Client *c);
static void propertynotify(XEvent *e);
@@ -277,6 +278,22 @@ static Window root, wmcheckwin;
struct NumTags { char limitexceeded[LENGTH(tags) > 31 ? -1 : 1]; };
/* function implementations */
+
+static void
+moveresize(const Arg *arg)
+{
+ XEvent ev;
+ Monitor *m = selmon;
+ if(!(m->sel && arg && arg->v && m->sel->isfloating))
+ return;
+ resize(m->sel, m->sel->x + ((int *)arg->v)[0],
+ m->sel->y + ((int *)arg->v)[1],
+ m->sel->w + ((int *)arg->v)[2],
+ m->sel->h + ((int *)arg->v)[3],
+ True);
+ while(XCheckMaskEvent(dpy, EnterWindowMask, &ev));
+}
+
void
applyrules(Client *c)
{