diff --git a/src/window.c b/src/window.c index cb4ff4e7..195c3e6a 100644 --- a/src/window.c +++ b/src/window.c @@ -2087,6 +2087,14 @@ void wWindowConfigure(WWindow *wwin, int req_x, int req_y, int req_width, int re int synth_notify = False; int resize; + /* if window size is guaranteed to fail - fix it to some reasonable + * defaults */ + if (req_height > SHRT_MAX) + req_height = 480; + + if (req_width > SHRT_MAX) + req_height = 640; + resize = (req_width != wwin->client.width || req_height != wwin->client.height); /* * if the window is being moved but not resized then