aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDimitri Sokolyuk <demon@dim13.org>2014-09-04 15:58:31 +0000
committerDimitri Sokolyuk <demon@dim13.org>2014-09-04 15:58:31 +0000
commitd53730775616da452dc9467b341ad72ac430eb21 (patch)
tree8ad9870520bba8dda460e7c031cf2c9fc6a74054
parentc85dbf25c003e9a72bf5b285325b855629271901 (diff)
don't switch to fullscreen if height is exceeded
-rw-r--r--spectrogram.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/spectrogram.c b/spectrogram.c
index c3576db..f99d507 100644
--- a/spectrogram.c
+++ b/spectrogram.c
@@ -456,13 +456,13 @@ main(int argc, char **argv)
XGetWindowAttributes(dsp, DefaultRootWindow(dsp), &wa);
width = round + HGAP;
- height = factor * width;
- if (fflag || width > wa.width || height > wa.height) {
+ if (fflag || width > wa.width) {
round = wa.width - HGAP;
width = wa.width;
- height = wa.height;
- fflag = 1;
}
+ height = factor * width;
+ if (height > wa.height)
+ height = wa.height;
sio = init_sio();