From 66af938858d43f64db1aca33a90de2b85c17e6bf Mon Sep 17 00:00:00 2001 From: rustdesk Date: Wed, 29 Dec 2021 23:40:24 +0800 Subject: [PATCH] https://sciter.com/forums/topic/menu-not-be-hidden-when-open-dialog-on-linux/ --- src/ui/common.tis | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/src/ui/common.tis b/src/ui/common.tis index 97aa81b73..09ffae08c 100644 --- a/src/ui/common.tis +++ b/src/ui/common.tis @@ -216,7 +216,19 @@ function getMsgboxParams() { return msgbox_params; } +// tmp workaround https://sciter.com/forums/topic/menu-not-be-hidden-when-open-dialog-on-linux/ function msgbox(type, title, text, callback=null, height=180, width=500, retry=0, contentStyle="") { + if (is_linux) { // fix menu not hidden issue + self.timer(1ms, + function() { + msgbox_(type, title, text, callback, height, width, retry, contentStyle); + }); + } else { + msgbox_(type, title, text, callback, height, width, retry, contentStyle); + } +} + +function msgbox_(type, title, text, callback, height, width, retry, contentStyle) { var has_msgbox = msgbox_params != null; if (!has_msgbox && !type) return; var remember = false;