From 6e6f8ca3f404d0868abd32ba2a154f3f3f18a839 Mon Sep 17 00:00:00 2001 From: Thomas Bernard Date: Fri, 16 Feb 2018 13:00:45 +0100 Subject: [PATCH] Open_popup() fix dropdown outside of the screen --- src/engine.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/engine.c b/src/engine.c index d11a2b60..10614fac 100644 --- a/src/engine.c +++ b/src/engine.c @@ -2301,6 +2301,11 @@ void Open_popup(word x_pos, word y_pos, word width,word height) { Windows_open++; + if (height > Screen_height) + height = Screen_height; + if (y_pos + height > Screen_height) // fix dropdown that would get bellow the screen + y_pos = Screen_height - height; + Window_width=width; Window_height=height; Window_pos_X=x_pos;