Krolyxon
Commit 1e2ddc4

Branches

Refs →

nsxiv1e2ddc4

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

Author
Bert Münnich
Date
2013-02-09 17:24 +0100
Parent
cef8d51
Commit
1e2ddc44d85c87449a6ad2ad62689fb41cfae858

+4 −15

2 files changed

  1. M Makefile +1 −1
  2. M window.c +3 −14
M Makefile View
@@ -1,4 +1,4 @@
1−VERSION = git-20130208
1+VERSION = git-20130209
22
33 PREFIX = /usr/local
44 MANPREFIX = $(PREFIX)/share/man
M window.c View
@@ -29,8 +29,6 @@
2929 #include "config.h"
3030
3131 enum {
32− WIN_MIN_W = 50,
33− WIN_MIN_H = 30,
3432 H_TEXT_PAD = 5,
3533 V_TEXT_PAD = 1
3634 };
@@ -128,16 +126,11 @@ void win_init(win_t *win)
128126 win->bar.bgcol = win_alloc_color(win, BAR_BG_COLOR);
129127 win->bar.fgcol = win_alloc_color(win, BAR_FG_COLOR);
130128
131− win->sizehints.flags = PWinGravity | PMinSize;
129+ win->sizehints.flags = PWinGravity;
132130 win->sizehints.win_gravity = NorthWestGravity;
133− if (options->fixed_win) {
131+ if (options->fixed_win)
134132 /* 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;
141134
142135 if (setlocale(LC_CTYPE, "") == NULL || XSupportsLocale() == 0)
143136 warn("no locale support");
@@ -191,14 +184,10 @@ void win_open(win_t *win)
191184 win->sizehints.flags |= USSize;
192185 else
193186 win->w = WIN_WIDTH;
194− win->w = MAX(win->w, WIN_MIN_W);
195− win->w = MIN(win->w, e->scrw);
196187 if ((gmask & HeightValue) != 0)
197188 win->sizehints.flags |= USSize;
198189 else
199190 win->h = WIN_HEIGHT;
200− win->h = MAX(win->h, WIN_MIN_H);
201− win->h = MIN(win->h, e->scrh);
202191 if ((gmask & XValue) != 0) {
203192 if ((gmask & XNegative) != 0) {
204193 win->x += e->scrw - win->w;