From 7d28392402442edad5c7df30f9c1666b89f21af2 Mon Sep 17 00:00:00 2001 From: rafa_99 Date: Tue, 13 Apr 2021 13:25:34 +0100 Subject: Removed Unused Code --- dwm.c | 83 ------------------------------------------------------------------- 1 file changed, 83 deletions(-) (limited to 'dwm.c') diff --git a/dwm.c b/dwm.c index 65e73d7..7aabb49 100644 --- a/dwm.c +++ b/dwm.c @@ -192,7 +192,6 @@ static void mappingnotify(XEvent *e); static void maprequest(XEvent *e); static void monocle(Monitor *m); static void moveresize(const Arg *arg); -static void moveresizeedge(const Arg *arg); static void movemouse(const Arg *arg); static Client *nexttiled(Client *c); static void pop(Client *); @@ -1251,88 +1250,6 @@ moveresize(const Arg *arg) { } } -void -moveresizeedge(const Arg *arg) { - /* move or resize floating window to edge of screen */ - Client *c; - c = selmon->sel; - char e; - int nx, ny, nw, nh, ox, oy, ow, oh; - int msx, msy, dx, dy, nmx, nmy; - int starty; - unsigned int dui; - Window dummy; - - nx = c->x; - ny = c->y; - nw = c->w; - nh = c->h; - - starty = selmon->showbar ? bh : 0; - - if (!c || !arg) - return; - if (selmon->lt[selmon->sellt]->arrange && !c->isfloating) - return; - if(sscanf((char *)arg->v, "%c", &e) != 1) - return; - - if(e == 't') - ny = starty; - - if(e == 'b') - ny = c->h > selmon->mh - 2 * c->bw ? c->h : selmon->mh - c->h - 2 * c->bw; - - if(e == 'l') - nx = 0; - - if(e == 'r') - nx = c->w > selmon->mw - 2 * c->bw ? c->w : selmon->mw - c->w - 2 * c->bw; - - if(e == 'T') { - /* if you click to resize again, it will return to old size/position */ - if(c->h + starty == c->oldh + c->oldy) { - nh = c->oldh; - ny = c->oldy; - } else { - nh = c->h + c->y - starty; - ny = starty; - } - } - - if(e == 'B') - nh = c->h + c->y + 2 * c->bw == selmon->mh ? c->oldh : selmon->mh - c->y - 2 * c->bw; - - if(e == 'L') { - if(c->w == c->oldw + c->oldx) { - nw = c->oldw; - nx = c->oldx; - } else { - nw = c->w + c->x; - nx = 0; - } - } - - if(e == 'R') - nw = c->w + c->x + 2 * c->bw == selmon->mw ? c->oldw : selmon->mw - c->x - 2 * c->bw; - - ox = c->x; - oy = c->y; - ow = c->w; - oh = c->h; - - XRaiseWindow(dpy, c->win); - Bool xqp = XQueryPointer(dpy, root, &dummy, &dummy, &msx, &msy, &dx, &dy, &dui); - resize(c, nx, ny, nw, nh, True); - - /* move cursor along with the window to avoid problems caused by the sloppy focus */ - if (xqp && ox <= msx && (ox + ow) >= msx && oy <= msy && (oy + oh) >= msy) { - nmx = c->x - ox + c->w - ow; - nmy = c->y - oy + c->h - oh; - XWarpPointer(dpy, None, None, 0, 0, 0, 0, nmx, nmy); - } -} - void movemouse(const Arg *arg) { -- cgit v1.2.3