aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2013-06-26 22:51:47 +0000
committerDimitri Sokolyuk <demon@dim13.org>2013-06-26 22:51:47 +0000
commit19a299d66a884315629caeb59af5db2f0a613732 (patch)
tree3f8ba9f16a56545257545252fd2644ea96681f17
parent3c3e3edc4a12b0239ded23bbf422553e4688c894 (diff)
minimal window size
-rw-r--r--spectrogram.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/spectrogram.c b/spectrogram.c
index e404db9..83bb3b1 100644
--- a/spectrogram.c
+++ b/spectrogram.c
@@ -16,6 +16,7 @@
*/
#include <X11/Xlib.h>
+#include <X11/Xutil.h>
#include <X11/keysym.h>
#include <sys/types.h>
@@ -292,6 +293,8 @@ main(int argc, char **argv)
Display *dsp;
Window win;
Atom delwin;
+ Atom shints;
+ XSizeHints *hints;
int scr;
struct panel *left, *right;
@@ -346,6 +349,14 @@ main(int argc, char **argv)
delwin = XInternAtom(dsp, "WM_DELETE_WINDOW", 0);
XSetWMProtocols(dsp, win, &delwin, 1);
+ shints = XInternAtom(dsp, "WM_NORMAL_HINTS", 0);
+ hints = XAllocSizeHints();
+ hints->flags = PMinSize;
+ hints->min_width = width;
+ hints->min_height = height;
+ XSetWMSizeHints(dsp, win, hints, shints);
+ XFree(hints);
+
left = init_panel(dsp, win, delta / 2, height, 1);
right = init_panel(dsp, win, delta / 2, height, 0);
fft = init_fft(delta);