centering apps only if transient_for is not(!) set
0e1c649d
1 file(s) · +1 −9
| 258 | 258 | c->maxw == c->minw && c->maxh == c->minh); |
|
| 259 | 259 | settitle(c); |
|
| 260 | 260 | ||
| 261 | - | if(trans && (tc = getclient(trans))) { |
|
| 262 | - | c->x = (tc->x + tc->w / 2) - (c->w / 2); |
|
| 263 | - | c->y = (tc->y + tc->h / 2) - (c->h / 2); |
|
| 264 | - | if((c->x + c->w < 0) || (c->x >= sw)) |
|
| 265 | - | c->x = (sw / 2) - (c->w / 2); |
|
| 266 | - | if((c->y + c->h < 0) || (c->y >= sh)) |
|
| 267 | - | c->y = ((sh - bh) / 2) - (c->h / 2) + bh; |
|
| 268 | - | } |
|
| 269 | - | else { |
|
| 261 | + | if(!trans) { |
|
| 270 | 262 | c->x = (sw / 2) - (c->w / 2); |
|
| 271 | 263 | c->y = ((sh - bh) / 2) - (c->h / 2) + bh; |
|
| 272 | 264 | } |