From 19a299d66a884315629caeb59af5db2f0a613732 Mon Sep 17 00:00:00 2001 From: Dimitri Sokolyuk Date: Wed, 26 Jun 2013 22:51:47 +0000 Subject: minimal window size --- spectrogram.c | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spectrogram.c b/spectrogram.c index e404db9..83bb3b1 100644 --- a/spectrogram.c +++ b/spectrogram.c @@ -16,6 +16,7 @@ */ #include +#include #include #include @@ -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); -- cgit v1.2.3