Closed dominiks closed 7 years ago
Hi! Which version of TornadoFX are you running against? We made some changes to this behavior in 1.6.0 and 1.6.1. Can you verify that the issue is still there with 1.6.1. If so, I'll investigate and have it fixed :)
Yes, also happens in 1.6.1.
I've added a property called currentWindow
to UIComponent
, which should point to either the modal window of the primary stage if no modal window is opened. This property is now the default value for the owner
parameter for the openModal
and openWindow
functions.
I don't have a dual monitor setup here right now, so I'm unable to test it at the moment. Can you verify if this works as expected for you?
Modals open on the correct screen in 1.6.2-SNAPSHOT when no owner is explicitly set. :+1:
Sweet! Thanks for this, it was a small but nice improvement :)
On my dual screen setup
openModal
always opens on the primary screen when no owner is explicitly set - even when the application is used on the other screen. So I find myself always addingowner = FX.primaryStage
to the call.Is there a use case for having no owner in the modal? I'd think it would be a good way of reducing boilerplate to add the primaryStage as the default value for the
owner
parameter and also have the expected behaviour for a modal dialog.