removed gravitate for the moment
629647df
3 file(s) · +1 −57
| 132 | 132 | } |
|
| 133 | 133 | ||
| 134 | 134 | void |
|
| 135 | - | gravitate(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 | - | ||
| 187 | - | void |
|
| 188 | 135 | killclient(Arg *arg) { |
|
| 189 | 136 | if(!sel) |
|
| 190 | 137 | return; |
|
| 291 | 238 | else |
|
| 292 | 239 | wc.border_width = BORDERPX; |
|
| 293 | 240 | XConfigureWindow(dpy, c->win, CWX | CWY | CWWidth | CWHeight | CWBorderWidth, &wc); |
|
| 294 | - | /*configure(c);*/ |
|
| 241 | + | configure(c); |
|
| 295 | 242 | XSync(dpy, False); |
|
| 296 | 243 | } |
|
| 297 | 244 | ||
| 114 | 114 | extern void focus(Client *c); /* focus c, c may be NULL */ |
|
| 115 | 115 | extern Client *getclient(Window w); /* return client of w */ |
|
| 116 | 116 | extern Client *getctitle(Window w); /* return client of title window */ |
|
| 117 | - | extern void gravitate(Client *c, Bool invert); /* gravitate c */ |
|
| 118 | 117 | extern void killclient(Arg *arg); /* kill c nicely */ |
|
| 119 | 118 | extern void manage(Window w, XWindowAttributes *wa); /* manage new client */ |
|
| 120 | 119 | extern void resize(Client *c, Bool sizehints, Corner sticky); /* resize c*/ |
| 161 | 161 | ||
| 162 | 162 | if((c = getclient(ev->window))) { |
|
| 163 | 163 | c->ismax = False; |
|
| 164 | - | gravitate(c, True); |
|
| 165 | 164 | if(ev->value_mask & CWX) |
|
| 166 | 165 | c->x = ev->x; |
|
| 167 | 166 | if(ev->value_mask & CWY) |
|
| 172 | 171 | c->h = ev->height; |
|
| 173 | 172 | if(ev->value_mask & CWBorderWidth) |
|
| 174 | 173 | c->border = ev->border_width; |
|
| 175 | - | gravitate(c, False); |
|
| 176 | 174 | wc.x = c->x; |
|
| 177 | 175 | wc.y = c->y; |
|
| 178 | 176 | wc.width = c->w; |
|