aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBert Münnich <ber.t@gmx.com>2013-02-09 17:24:41 +0100
committerBert Münnich <ber.t@gmx.com>2013-02-09 17:24:41 +0100
commit1e2ddc44d85c87449a6ad2ad62689fb41cfae858 (patch)
tree534ef263e3a3c52a58b2a8a4d11782a6a61c55db
parentcef8d51153073d694f66889ad536736109aaf77e (diff)
No checks on window size, use whatever the user has specified
-rw-r--r--Makefile2
-rw-r--r--window.c17
2 files changed, 4 insertions, 15 deletions
diff --git a/Makefile b/Makefile
index ef3bd79..1c7a95d 100644
--- a/Makefile
+++ b/Makefile
@@ -1,4 +1,4 @@
-VERSION = git-20130208
+VERSION = git-20130209
PREFIX = /usr/local
MANPREFIX = $(PREFIX)/share/man
diff --git a/window.c b/window.c
index 2c42a7d..00b052c 100644
--- a/window.c
+++ b/window.c
@@ -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;