summaryrefslogtreecommitdiff
path: root/dwm.c
diff options
context:
space:
mode:
authorrafa_99 <rafa99@protonmail.com>2020-07-05 00:33:25 +0000
committerrafa_99 <rafa99@protonmail.com>2020-07-05 00:33:25 +0000
commit87b99e7f2d71bec8d360eb6be4982a9de9a33a5a (patch)
treeea5388d9c93f116c0f3050d84f081364488b5033 /dwm.c
parentbfb04a8635a9f68502bf32d795813a7cf24f8179 (diff)
Cleaned Up Non Used Functions
Diffstat (limited to 'dwm.c')
-rw-r--r--dwm.c99
1 files changed, 0 insertions, 99 deletions
diff --git a/dwm.c b/dwm.c
index eec5656..daa5a98 100644
--- a/dwm.c
+++ b/dwm.c
@@ -191,10 +191,8 @@ static void killclient(const Arg *arg);
static void manage(Window w, XWindowAttributes *wa);
static void mappingnotify(XEvent *e);
static void maprequest(XEvent *e);
-static void monocle(Monitor *m);
static void motionnotify(XEvent *e);
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 *);
@@ -1206,21 +1204,6 @@ maprequest(XEvent *e)
}
void
-monocle(Monitor *m)
-{
- unsigned int n = 0;
- Client *c;
-
- for (c = m->clients; c; c = c->next)
- if (ISVISIBLE(c))
- n++;
- if (n > 0) /* override layout symbol */
- snprintf(m->ltsymbol, sizeof m->ltsymbol, "[%d]", n);
- for (c = nexttiled(m->clients); c; c = nexttiled(c->next))
- resize(c, m->wx, m->wy, m->ww - 2 * c->bw, m->wh - 2 * c->bw, 0);
-}
-
-void
motionnotify(XEvent *e)
{
static Monitor *mon = NULL;
@@ -1362,88 +1345,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);
- }
-}
-
Client *
nexttiled(Client *c)
{