No checks on window size, use whatever the user has specified

This commit is contained in:
Bert Münnich 2013-02-09 17:24:41 +01:00
parent cef8d51153
commit 1e2ddc44d8
2 changed files with 4 additions and 15 deletions

View File

@ -1,4 +1,4 @@
VERSION = git-20130208
VERSION = git-20130209
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man

View File

@ -29,8 +29,6 @@
#include "config.h"
enum {
WIN_MIN_W = 50,
WIN_MIN_H = 30,
H_TEXT_PAD = 5,
V_TEXT_PAD = 1
};
@ -128,16 +126,11 @@ void win_init(win_t *win)
win->bar.bgcol = win_alloc_color(win, BAR_BG_COLOR);
win->bar.fgcol = win_alloc_color(win, BAR_FG_COLOR);
win->sizehints.flags = PWinGravity | PMinSize;
win->sizehints.flags = PWinGravity;
win->sizehints.win_gravity = NorthWestGravity;
if (options->fixed_win) {
if (options->fixed_win)
/* actual min/max values set in win_update_sizehints() */
win->sizehints.flags |= PMaxSize;
} else {
/* min values only set here, never updated in win_update_sizehints() */
win->sizehints.min_width = WIN_MIN_W;
win->sizehints.min_height = WIN_MIN_H;
}
win->sizehints.flags |= PMinSize | PMaxSize;
if (setlocale(LC_CTYPE, "") == NULL || XSupportsLocale() == 0)
warn("no locale support");
@ -191,14 +184,10 @@ void win_open(win_t *win)
win->sizehints.flags |= USSize;
else
win->w = WIN_WIDTH;
win->w = MAX(win->w, WIN_MIN_W);
win->w = MIN(win->w, e->scrw);
if ((gmask & HeightValue) != 0)
win->sizehints.flags |= USSize;
else
win->h = WIN_HEIGHT;
win->h = MAX(win->h, WIN_MIN_H);
win->h = MIN(win->h, e->scrh);
if ((gmask & XValue) != 0) {
if ((gmask & XNegative) != 0) {
win->x += e->scrw - win->w;