From 86ffb61a3bf220eb60b9b3cb25e5dd90c2e2b18c Mon Sep 17 00:00:00 2001 From: Samuel Mannehed Date: Tue, 5 Oct 2021 16:28:59 +0200 Subject: [PATCH] Remove modal property from ServerDialog Modal windows are meant to be child windows such as menus or popups that are intended to always appear in front of its parent. Modal FLTK windows without a parent seem to behave strangely on macOS. Such windows can appear in front of their modal children windows. When opening OptionsDialog from ServerDialog, it was easy to get to a broken state by then switching focus back to the ServerDialog. This would cause the ServerDialog to appear in front, but not be useable as the options window would still have control of mouse and keyboard. Additionally, modal windows without parents appear in front of other normal applications on macOS. This means that the ServerDialog couldn't be put behind Safari for example. The fact that ServerDialog was a "modal" window was a bit strange, seeing as it doesn't have any parent windows. Removing the modal property from this window causes all the strange-ness to go away. --- vncviewer/ServerDialog.cxx | 2 -- 1 file changed, 2 deletions(-) diff --git a/vncviewer/ServerDialog.cxx b/vncviewer/ServerDialog.cxx index ba0386ca..d49ebb8d 100644 --- a/vncviewer/ServerDialog.cxx +++ b/vncviewer/ServerDialog.cxx @@ -112,8 +112,6 @@ ServerDialog::ServerDialog() button->callback(this->handleConnect, this); callback(this->handleCancel, this); - - set_modal(); } -- 2.39.5