nsxiv1e2ddc4
No checks on window size, use whatever the user has specified
+4 −15
2 files changed
| @@ -1,4 +1,4 @@ | |||
| 1 | − | VERSION = git-20130208 | |
| 1 | + | VERSION = git-20130209 | |
| 2 | 2 | ||
| 3 | 3 | PREFIX = /usr/local | |
| 4 | 4 | MANPREFIX = $(PREFIX)/share/man | |
| @@ -29,8 +29,6 @@ | |||
| 29 | 29 | #include "config.h" | |
| 30 | 30 | ||
| 31 | 31 | enum { | |
| 32 | − | WIN_MIN_W = 50, | |
| 33 | − | WIN_MIN_H = 30, | |
| 34 | 32 | H_TEXT_PAD = 5, | |
| 35 | 33 | V_TEXT_PAD = 1 | |
| 36 | 34 | }; | |
| @@ -128,16 +126,11 @@ void win_init(win_t *win) | |||
| 128 | 126 | win->bar.bgcol = win_alloc_color(win, BAR_BG_COLOR); | |
| 129 | 127 | win->bar.fgcol = win_alloc_color(win, BAR_FG_COLOR); | |
| 130 | 128 | ||
| 131 | − | win->sizehints.flags = PWinGravity | PMinSize; | |
| 129 | + | win->sizehints.flags = PWinGravity; | |
| 132 | 130 | win->sizehints.win_gravity = NorthWestGravity; | |
| 133 | − | if (options->fixed_win) { | |
| 131 | + | if (options->fixed_win) | |
| 134 | 132 | /* actual min/max values set in win_update_sizehints() */ | |
| 135 | − | win->sizehints.flags |= PMaxSize; | |
| 136 | − | } else { | |
| 137 | − | /* min values only set here, never updated in win_update_sizehints() */ | |
| 138 | − | win->sizehints.min_width = WIN_MIN_W; | |
| 139 | − | win->sizehints.min_height = WIN_MIN_H; | |
| 140 | − | } | |
| 133 | + | win->sizehints.flags |= PMinSize | PMaxSize; | |
| 141 | 134 | ||
| 142 | 135 | if (setlocale(LC_CTYPE, "") == NULL || XSupportsLocale() == 0) | |
| 143 | 136 | warn("no locale support"); | |
| @@ -191,14 +184,10 @@ void win_open(win_t *win) | |||
| 191 | 184 | win->sizehints.flags |= USSize; | |
| 192 | 185 | else | |
| 193 | 186 | win->w = WIN_WIDTH; | |
| 194 | − | win->w = MAX(win->w, WIN_MIN_W); | |
| 195 | − | win->w = MIN(win->w, e->scrw); | |
| 196 | 187 | if ((gmask & HeightValue) != 0) | |
| 197 | 188 | win->sizehints.flags |= USSize; | |
| 198 | 189 | else | |
| 199 | 190 | win->h = WIN_HEIGHT; | |
| 200 | − | win->h = MAX(win->h, WIN_MIN_H); | |
| 201 | − | win->h = MIN(win->h, e->scrh); | |
| 202 | 191 | if ((gmask & XValue) != 0) { | |
| 203 | 192 | if ((gmask & XNegative) != 0) { | |
| 204 | 193 | win->x += e->scrw - win->w; | |