summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--client.c55
-rw-r--r--dwm.h1
-rw-r--r--event.c2
3 files changed, 1 insertions, 57 deletions
diff --git a/client.c b/client.c
index d691340..898b2fc 100644
--- a/client.c
+++ b/client.c
@@ -132,59 +132,6 @@ getctitle(Window w) {
132} 132}
133 133
134void 134void
135gravitate(Client *c, Bool invert) {
136 int dx = 0, dy = 0;
137
138 return;
139 switch(c->grav) {
140 default:
141 break;
142 case StaticGravity:
143 case NorthWestGravity:
144 case NorthGravity:
145 case NorthEastGravity:
146 dy = c->border;
147 break;
148 case EastGravity:
149 case CenterGravity:
150 case WestGravity:
151 dy = -(c->h / 2) + c->border;
152 break;
153 case SouthEastGravity:
154 case SouthGravity:
155 case SouthWestGravity:
156 dy = -(c->h);
157 break;
158 }
159 switch (c->grav) {
160 default:
161 break;
162 case StaticGravity:
163 case NorthWestGravity:
164 case WestGravity:
165 case SouthWestGravity:
166 dx = c->border;
167 break;
168 case NorthGravity:
169 case CenterGravity:
170 case SouthGravity:
171 dx = -(c->w / 2) + c->border;
172 break;
173 case NorthEastGravity:
174 case EastGravity:
175 case SouthEastGravity:
176 dx = -(c->w + c->border);
177 break;
178 }
179 if(invert) {
180 dx = -dx;
181 dy = -dy;
182 }
183 c->x += dx;
184 c->y += dy;
185}
186
187void
188killclient(Arg *arg) { 135killclient(Arg *arg) {
189 if(!sel) 136 if(!sel)
190 return; 137 return;
@@ -291,7 +238,7 @@ resize(Client *c, Bool sizehints, Corner sticky) {
291 else 238 else
292 wc.border_width = BORDERPX; 239 wc.border_width = BORDERPX;
293 XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc); 240 XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc);
294 /*configure(c);*/ 241 configure(c);
295 XSync(dpy, False); 242 XSync(dpy, False);
296} 243}
297 244
diff --git a/dwm.h b/dwm.h
index 2def8f2..773736d 100644
--- a/dwm.h
+++ b/dwm.h
@@ -114,7 +114,6 @@ extern void configure(Client *c); /* send synthetic configure event */
114extern void focus(Client *c); /* focus c, c may be NULL */ 114extern void focus(Client *c); /* focus c, c may be NULL */
115extern Client *getclient(Window w); /* return client of w */ 115extern Client *getclient(Window w); /* return client of w */
116extern Client *getctitle(Window w); /* return client of title window */ 116extern Client *getctitle(Window w); /* return client of title window */
117extern void gravitate(Client *c, Bool invert); /* gravitate c */
118extern void killclient(Arg *arg); /* kill c nicely */ 117extern void killclient(Arg *arg); /* kill c nicely */
119extern void manage(Window w, XWindowAttributes *wa); /* manage new client */ 118extern void manage(Window w, XWindowAttributes *wa); /* manage new client */
120extern void resize(Client *c, Bool sizehints, Corner sticky); /* resize c*/ 119extern void resize(Client *c, Bool sizehints, Corner sticky); /* resize c*/
diff --git a/event.c b/event.c
index 4e11552..72595b2 100644
--- a/event.c
+++ b/event.c
@@ -161,7 +161,6 @@ configurerequest(XEvent *e) {
161 161
162 if((c = getclient(ev->window))) { 162 if((c = getclient(ev->window))) {
163 c->ismax = False; 163 c->ismax = False;
164 gravitate(c, True);
165 if(ev->value_mask & CWX) 164 if(ev->value_mask & CWX)
166 c->x = ev->x; 165 c->x = ev->x;
167 if(ev->value_mask & CWY) 166 if(ev->value_mask & CWY)
@@ -172,7 +171,6 @@ configurerequest(XEvent *e) {
172 c->h = ev->height; 171 c->h = ev->height;
173 if(ev->value_mask & CWBorderWidth) 172 if(ev->value_mask & CWBorderWidth)
174 c->border = ev->border_width; 173 c->border = ev->border_width;
175 gravitate(c, False);
176 wc.x = c->x; 174 wc.x = c->x;
177 wc.y = c->y; 175 wc.y = c->y;
178 wc.width = c->w; 176 wc.width = c->w;